Community
Participate
Working Groups
(from https://github.com/golo-lang/golo-lang/issues/189) Wouldn't be nice to do function split = |text, seperator=";"| { ... } require(split("foo;bar") is ["foor", "bar"], "Default separator value) require(split("foo:bar", ":") is ["foor", "bar"], "Explicited defined separator value) ---- yloiseau commented on 2 Oct 2014 :+1: ---- jponge commented on 2 Oct 2014 Yeah, it would be nice :smile: ---- danielpetisme commented on 2 Oct 2014 ie. DIY isn't it ? ---- jponge commented on 2 Oct 2014 That would make a fun exercise :-) ---- danielpetisme commented on 2 Oct 2014 Sounds famimiar. You told me the dame with the string interpolation :smile: ---- yloiseau commented on 10 Oct 2014 You can already do function split = |text, seperator| { ... } function split = |text| -> split(text, ";") require(split("foo;bar") is ["foor", "bar"], "Default separator value) require(split("foo:bar", ":") is ["foor", "bar"], "Explicited defined separator value) :smile: my 2cts ---- yloiseau commented on 23 Oct 2014 btw, having named arguments/parameters would also be nice, and seems to be a related topic.