her.esy.fun/src/posts/0010-Haskell-Now/list_monad.hs
Yann Esposito (Yogsototh) 3f403f946b
Progress
2019-12-26 17:27:19 +01:00

15 lines
266 B
Haskell

import Control.Monad (guard)
allCases = [1..10]
resolve :: [(Int,Int,Int)]
resolve = do
x <- allCases
y <- allCases
z <- allCases
guard $ 4*x + 2*y < z
return (x,y,z)
main = do
print resolve