extract(Str) -> A = string:tokens(Str," "). lists:sort(A).
I could of course do this: lists:sort(string:tokens(Str," ")).
But lets say I want a bigger function that slo includes some deeper function calls, lets say 4-5 calls deep.
That's the main thing I dislike about functional programming, it is very expressive but sometimes it is hard afterwards to follow what a function does and it is hard hwen you have to read what is happening from right to the left. It is easier to reason about when I can split into several calls.
I guess it is doable but I can't figure out the syntax.
|
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions