Skip to content

EPITECH-Bordeaux/list-ocaml

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

list-ocaml

What is this

Record list module to learn Caml language

Type

type 'a my_list =
  | Item of ('a * 'a my_list)
  | Empty

Function

* 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

About

Recode of the list in Ocaml

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • OCaml 100.0%