How come that I can do:
let printTeams x : unit =
let rnd = new Random()
Seq.toList x |> List.sortBy (fun x -> rnd.Next()) |> printTeams'
but not:
let printTeams x : unit =
let rnd = new Random()
printTeamsRec' <| Seq.toList x <| List.sortBy(fun x -> rnd.Next())
I'm just getting an error on the last one, which says:
Type mismatch. Expecting a string list -> 'a -> 'b but given a
string list -> unit The type ''a -> 'b' does not match the type 'unit'
The error occures on the third line at printTeamsRec'
Any help would be appreciate.