
21 Jun
2013
21 Jun
'13
7:14 a.m.
afaik in scala you can say:
null . dropWhile (_ == '.' || _ == '/')
which is a bit more compact than the haskell...
No, it would be desugared to: dropWhile ((a,b) => a == '.' || b == '/') scala> "abc".dropWhile(_ == '.' || _ == '/') <console>:8: error: wrong number of parameters; expected = 1 "abc".dropWhile(_ == '.' || _ == '/') You would have to do the same thing as in Haskell to make it work: scala> "abc".dropWhile(a => a == '.' || a == '/') res20: String = abc Cheers Sylvain