Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 2a
- let rec takeSomeDrinks n ls =
- match n with
- | 0 -> []
- | _ -> List.head ls :: takeSomeDrinks (n - 1) (List.tail ls)
- printfn "%A" (takeSomeDrinks 3 ["Apple Juice"; "Americano"; "Cola"; "Orange juice"; "Cappucino"])
- // 2b
- let a = [("Americano", 212.25); ("Cafe Latte", 213.00); ("Espresso", 211.75); ("Cappucino", 315.75)]
- for i = 0 to (a.Length-1) do
- printfn "%s" (fst(a.[i]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement