Skip to main content
edited body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88

Haskell, 7 bytes

mapM id

Try it online!

Built-in, 8 bytes

sequence

Try it online!

Less boring, 33 bytes

Out-golfed by xnor's answerxnor's answer. Go upvote that instead!

f[]=[[]]
f(h:t)=[i:j|i<-h,j<-f t]

Try it online!

Haskell, 7 bytes

mapM id

Try it online!

Built-in, 8 bytes

sequence

Try it online!

Less boring, 33 bytes

Out-golfed by xnor's answer. Go upvote that instead!

f[]=[[]]
f(h:t)=[i:j|i<-h,j<-f t]

Try it online!

Haskell, 7 bytes

mapM id

Try it online!

Built-in, 8 bytes

sequence

Try it online!

Less boring, 33 bytes

Out-golfed by xnor's answer. Go upvote that instead!

f[]=[[]]
f(h:t)=[i:j|i<-h,j<-f t]

Try it online!

added 70 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88

Haskell, 7 bytes

mapM id

Try it online!

Built-in, 8 bytes

sequence

Try it online!

Less boring, 33 bytes

 

Out-golfed by xnor's answer. Go upvote that instead!

f[]=[[]]
f(h:t)=[i:j|i<-h,j<-f t]

Try it online!

Haskell, 7 bytes

mapM id

Try it online!

Built-in, 8 bytes

sequence

Try it online!

Less boring, 33 bytes

 
f[]=[[]]
f(h:t)=[i:j|i<-h,j<-f t]

Try it online!

Haskell, 7 bytes

mapM id

Try it online!

Built-in, 8 bytes

sequence

Try it online!

Less boring, 33 bytes

Out-golfed by xnor's answer. Go upvote that instead!

f[]=[[]]
f(h:t)=[i:j|i<-h,j<-f t]

Try it online!

added 292 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88

Haskell, 87 bytes

mapM id

Try it online!

Built-in, 8 bytes

sequence

Try it online!

Less boring, 33 bytes

f[]=[[]]
f(h:t)=[i:j|i<-h,j<-f t]

Try it online!

Haskell, 8 bytes

sequence

Try it online!

Less boring, 33 bytes

f[]=[[]]
f(h:t)=[i:j|i<-h,j<-f t]

Try it online!

Haskell, 7 bytes

mapM id

Try it online!

Built-in, 8 bytes

sequence

Try it online!

Less boring, 33 bytes

f[]=[[]]
f(h:t)=[i:j|i<-h,j<-f t]

Try it online!

added 289 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88
Loading
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88
Loading