Mild take: if you ever feel like learning an esoteric language with a dizzying array of symbols and vocabulary, Q is probably a better choice than Haskell.
-
-
Show this thread
-
Q's combinators are interesting. Especially overloading on arity: f' = map f x f' y = map f (zip x y) x f/: y = map (f x) y x f\: y = map (λ x. f x y) x f/ (unary) = fix λ g. λ y. if f y = y then y else g (f y) f/ (binary) = reduce f x f/ y = fold f x y x f\ y = scan f x y
Show this thread -
Using fold instead of for-loop is annoying. But one benefit: flip a character to unroll the state of the fold. q) ((); 0) check/ "()({)" "({" 3 q) ((); 0) check\ "()({)" ,"(" 0 "" 0 ,"(" 0 "({" 0 "({" 3
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
cognitive psychology. PhD