Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %<LList T>::=lNil|lCons(T({}-><LList T>))
- declare fun {ToLazyList L}
- case L of
- H|T then lCons(H fun{$} {ToLazyList T} end)
- [] nil then lNil
- end
- end
- declare fun {Split Podzial#Lista}
- case Lista of
- lNil then lNil
- [] lCons(H T) then case {Podzial H} of
- true then lCons(H fun{$} {Split Podzial#{T}}end)
- [] false then {Split Podzial#{T}}
- end
- end
- end
- declare fun {Podzial1 Y}
- 5>Y
- end
- declare fun {LTake LL}
- case LL of
- lNil then nil
- [] lCons(X LT) then X|{LTake {LT}}
- end
- end
- {Show true}
- {Show{Split Podzial1#{ToLazyList [1 2 3 4 5 6 7 8 nil]}}#{LTake {Split (!Podzial1)#{ToLazyList [1 2 3 4 5 6 7 8 nil]}}}}
Add Comment
Please, Sign In to add comment