Flailing with 15
parent
9cc718e6b2
commit
bc3247a792
|
@ -14,10 +14,31 @@ main = print ans
|
|||
|
||||
ans = 42
|
||||
|
||||
limit = 20
|
||||
points = [(x,y) | x <- [1..limit], y <- [1..limit]]
|
||||
limit = 2
|
||||
points = [ (x,y)
|
||||
| x <- [0..limit]
|
||||
, y <- [0..limit]
|
||||
]
|
||||
|
||||
data Direction = Right | Down
|
||||
|
||||
move Right (x,y) = (x+1, y )
|
||||
move Down (x,y) = (x , y+1)
|
||||
|
||||
-- solve :: (Int, Int) -> [[(Int, Int)]]
|
||||
{-
|
||||
λ> [(0,0)]
|
||||
[(0,0)]
|
||||
λ> [(0,0),(1,0),(2,0),(2,1),(2,2)]
|
||||
[(0,0),(1,0),(2,0),(2,1),(2,2)]
|
||||
λ> [ [(0,0),(1,0),(2,0),(2,1),(2,2)], [(0,0),(1,0),(1,1),(2,1),(2,2)]]
|
||||
[[(0,0),(1,0),(2,0),(2,1),(2,2)],[(0,0),(1,0),(1,1),(2,1),(2,2)]]
|
||||
λ>
|
||||
-}
|
||||
|
||||
data Tree a
|
||||
= Leaf a
|
||||
| Branch (Tree a) (Tree a)
|
||||
deriving (Show)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue