Skip to content

Instantly share code, notes, and snippets.

@tangentstorm tangentstorm/j-vs-hs.md
Last active Jan 4, 2016

Embed
What would you like to do?
j vs haskell
h> (map sum)[[0..n]|n<-[0..10]
j] +/"1 i."0 >:i.11


j] +~^:5]1
h> let rfx f y = f y y ; pow = (\n f -> if n == 0 then id else f . pow (n-1) f) in pow 5 (rfx (+)) 1 

j] +/~i.4
h> let tbl f xs=[[f x y|x<-xs]|y<-xs] in tbl(+)[0..3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.