Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local X Drop Length L in
- fun {Length L}
- case L of H|T then 1+{Length T}
- else 0
- end
- end
- fun {Drop X N}
- if {Length X} >= N then
- H|T = X in case N of 1 then T
- N of 0 then X
- else {Drop T N-1}
- end
- else
- nil
- end
- end
- L = [1 2 3 5]
- {Browse {Drop L 0}}
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement