lab08: init

This commit is contained in:
2026-03-02 11:14:28 -08:00
parent 278f9dce2e
commit 8a13b621bf
6 changed files with 187 additions and 0 deletions

15
lab08/bender.hs Normal file
View File

@@ -0,0 +1,15 @@
type Pos = (Int, Int)
start = (0,0)
up (x, y) = (x, y+1)
down (x, y) = (x, y-1)
left (x, y) = (x-1, y)
right (x, y) = (x+1, y)
x -: f = f x
-- Using the "-:" operator, we can chain movements together
test1 = start -: up -: right
test2 = start -: up -: left -: left -: right -: down