
29 May
2013
29 May
'13
3:38 p.m.
hi, i want to know if a string contains only "." and "/" characters. i do something like that: null . dropWhile (\c -> c == '.' || c == '/') now it's a shame, because if I wanted only to check for "." then I would have: null . dropWhile (=='.') afaik in scala you can say: null . dropWhile (_ == '.' || _ == '/') which is a bit more compact than the haskell... I was thinking to use "and" but I'm not sure it would end up being readable... Any idea? Or I am trying too hard to make it compact? Emmanuel