We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skipWhile
takeWhile
This test compares the behaviour between the methods for ImmutableList and Array
ImmutableList
Array
#r "nuget:FSharp.Collections.Immutable" #r "nuget:Unquote" open FSharp.Collections.Immutable open Swensen.Unquote.Assertions let xs = [ "one"; "two"; "three"; "four" ] let xsIL = ImmutableList.ofList xs let xsA = Array.ofList xs let notThree = (<>) "three" test <@ (xsIL |> ImmutableList.skipWhile notThree |> ImmutableList.toArray) = (xsA |> Array.skipWhile notThree) @> test <@ (xsIL |> ImmutableList.takeWhile notThree |> ImmutableList.toArray) = (xsA |> Array.takeWhile notThree) @>
Test failed: xsIL |> (fun list -> ImmutableList.skipWhile notThree list) |> ImmutableList.toArray = (xsA |> (fun array -> Array.skipWhile notThree array)) seq ["one"; "two"; "three"; "four"] |> (fun list -> ImmutableList.skipWhile notThree list) |> ImmutableList.toArray = ([|"one"; "two"; "three"; "four"|] |> (fun array -> Array.skipWhile notThree array)) seq ["one"; "two"] |> ImmutableList.toArray = [|"three"; "four"|] [|"one"; "two"|] = [|"three"; "four"|] false Test failed: xsIL |> (fun list -> ImmutableList.takeWhile notThree list) |> ImmutableList.toArray = (xsA |> (fun array -> Array.takeWhile notThree array)) seq ["one"; "two"; "three"; "four"] |> (fun list -> ImmutableList.takeWhile notThree list) |> ImmutableList.toArray = ([|"one"; "two"; "three"; "four"|] |> (fun array -> Array.takeWhile notThree array)) seq ["three"; "four"] |> ImmutableList.toArray = [|"one"; "two"|] [|"three"; "four"|] = [|"one"; "two"|] false
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This test compares the behaviour between the methods for
ImmutableList
andArray
The text was updated successfully, but these errors were encountered: