MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1y64m6q/one_pipe_through_string_array_and_map/
r/programminghorror • u/Elfet • 5h ago
7 comments sorted by
2
Looks like Elixir. Pipes are very cool.
1 u/Elfet 4h ago https://ant-lang.org
1
https://ant-lang.org
13
How is this horror? Looks like pretty standard query stuff.
0
I dislike that map({x.value.length()}) still contains the original value. A map should just return the computed value
1 u/Elfet 4h ago x is `Entry[string, Array[string]]` with { key, value }How else do you map a Map{}? 0 u/Agitated-Display6382 3h ago After map, I would expect to have only the computed value. Sort of: given fforeach x in myArray yield return f(x)Not: yield return (x, f(x)) 1 u/Elfet 46m ago This Map.map vs Array.maphttps://ant-lang.org/docs/lib/Map/map
x is `Entry[string, Array[string]]` with { key, value }
How else do you map a Map{}?
0 u/Agitated-Display6382 3h ago After map, I would expect to have only the computed value. Sort of: given fforeach x in myArray yield return f(x)Not: yield return (x, f(x)) 1 u/Elfet 46m ago This Map.map vs Array.maphttps://ant-lang.org/docs/lib/Map/map
After map, I would expect to have only the computed value. Sort of: given f
foreach x in myArray yield return f(x)
Not: yield return (x, f(x))
1 u/Elfet 46m ago This Map.map vs Array.maphttps://ant-lang.org/docs/lib/Map/map
This Map.map vs Array.map
https://ant-lang.org/docs/lib/Map/map
2
u/NatoBoram 4h ago
Looks like Elixir. Pipes are very cool.
13
u/monotone2k 5h ago
How is this horror? Looks like pretty standard query stuff.
0
u/Agitated-Display6382 4h ago
I dislike that map({x.value.length()}) still contains the original value. A map should just return the computed value