Erlang futures

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Erlang futures

James Hague-3
> To be truly a binary version it should return two binaries not a list
> and binary.  I think the easiest and most efficient way would be:

True.  I've found that when parsing a binary I usually need to take the
parsed bit at the end and turn it into a list anyway.  But maybe not in all
cases, so it would be better to leave the conversion to the caller.

BTW, the last lines of my original code should have been:

splitwith(Pred, <<>>, Taken) ->