Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type node =
- {
- mutable next: node option;
- value: int;
- }
- ;;
- type linkedlist =
- {
- mutable head: node option;
- }
- ;;
- let rec append element n option =
- match n.next with
- Some node -> append element n.next
- | None -> n.next <- element;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement