K
let
- это let rec
?Size: a a a
K
let
- это let rec
?K
let
-объявлений, позволяяtest : Int
test =
let
y = x
x = 1
in y
AY
AY
let
-объявлений, позволяяtest : Int
test =
let
y = x
x = 1
in y
K
AY
K
ones = 1 : ones
AY
K
AY
K
type List a = List (() -> Either (a, List a) ())
AY
AY
K
repeat x = List <| \() -> (x, repeat x)
head (LIst thunk) = case thunk () of
| Left (x, _) -> Just x
| Right () -> Nothing
tail (LIst thunk) = case thunk () of
| Left (_, xs) -> Just xs
| Right () -> Nothing
repeat 1
- бесконечный (в терминах head
/tail
) список единиц.K
AY
AY
MP
AY
AP