![]() | ![]() | ![]() | Exercise 4 - Filter | Documentation and user's manual | Table of contents | OCaml programs |
|
Write a function named sublist that computes from a given predicate the function that extracts the sublist of the elements in a list satisfying the predicate.
Its type must be ('a -> bool) -> ('a list -> 'a list) .
|
|
Use sublist to write a function that computes the sublist of the positive integers in a list.
|
![]() | ![]() | ![]() | Exercise 4 - Filter | Documentation and user's manual | Table of contents | OCaml programs |