Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec dodawanie n x w=
- match n with
- | 0->w
- |_->dodawanie (n-1) x (w+x)
- dodawanie 3 4 0
- let segregowanie lista=
- lista |> List.filter(fun x->x>5)
- segregowanie [1..10]
- let rec zad1 list=
- match list with
- | []->None
- |x::[] -> Some(x)
- |x::xs ->zad1 xs
- zad1 [1..10]
- let rec nierosnacy lista=
- match lista with
- |[]->true
- |x::xs->
- match xs with
- |x1::_ ->
- if(x1>x) then false
- else nierosnacy xs
- nierosnacy[1..10]
- nierosnacy [10;2;3;4;5;1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement