https://github.com/remirobert/list-ocaml
Recode of the list in Ocaml
https://github.com/remirobert/list-ocaml
Last synced: about 1 month ago
JSON representation
Recode of the list in Ocaml
- Host: GitHub
- URL: https://github.com/remirobert/list-ocaml
- Owner: remirobert
- Created: 2014-02-28T17:39:27.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-10T15:49:40.000Z (over 12 years ago)
- Last Synced: 2025-01-11T06:13:18.194Z (over 1 year ago)
- Language: OCaml
- Size: 302 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
list-ocaml
==========
What is this
============
Record list module to learn Caml language
Type
====
```Ocaml
type 'a my_list =
| Item of ('a * 'a my_list)
| Empty
```
Function
=======
``` Ocaml
* length : ’a my_list -> int
* hd : ’a my_list -> ’a
* tl : ’a my_list -> ’a my_list
* nth : ’a my_list -> int -> ’a
* rev : ’a my_list -> ’a my_list
* append : ’a my_list -> ’a my_list -> ’a my_list
* rev_append : ’a my_list -> ’a my_list -> ’a my_list
* flatten : ’a my_list my_list -> ’a my_list
* iter : (’a -> ’b) -> ’a my_list -> unit
* map : (’a -> ’b) -> ’a my_list -> ’b my_list
* fold_left : (’a -> ’b -> ’a) -> ’a -> ’b my_list -> ’a
* for_all : (’a -> bool) -> ’a my_list -> bool
* exists : (’a -> bool) -> ’a my_list -> bool
* mem : ’a -> ’a my_list -> bool
* memq : ’a -> ’a my_list -> bool
* filter : (’a -> bool) -> ’a my_list -> ’a my_list
* mem_assoc : ’a -> (’a * ’b) my_list -> bool
* assoc : ’a -> (’a * ’b) my_list -> ’b
* split : (’a * ’b) my_list -> ’a my_list * ’b my_list
* remove_assoc : ’a -> (’a * ’b) my_list -> (’a * ’b) my_list
```