Re: better flatten()?

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...
petelomax said...

I'm not absolutely against the idea of two functions, but I'm not convinced we really need that split yet either.

It seemed reasonable to me that flatten_all() always returned a sequence of atoms, but flatten_seq() handled strings gracefully.

-Greg

My code implements flatten_all when the delimiter is {}, and flatten_seq when given a delimiter. Euphoria makes no fundamental distinction between strings and sequences. For example, how should flatten() handle {"Range", {-3.45, 102.50}} given the delimiter " is "?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu