These are chat archives for evhub/coconut

Nov 2018
Nov 13 2018 13:48 UTC
Hello, is there such a thing as clojure’s 'juxt'? Where i can combine many functions into a function that when applied to a value, returns a collection os the results of applying such functions?
You could also think of it as a twisted ‘map’, exchanging values for fucntions and vice versa
Evan Hubinger
Nov 13 2018 21:57 UTC
@yvendruscolo You could do something like
def juxt(*fns) = x -> map(f -> f(x), fns)
Nov 13 2018 21:58 UTC
Nice, just thought it could already be there