You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we have List.enum : List α → List (Nat × α), List.enumFrom : Nat → List α → List (Nat × α), and Array.zipWithIndex : Array α → Array (α × Nat).
My current intentions are to:
rename List.enum to List.zipWithIndex
swap the pair order for the List functions
give both List and Array's zipWithIndex a default from : Nat := 0 argument that subsumes the functionality of enumFrom, and remove List.enumFrom.
The text was updated successfully, but these errors were encountered:
Not sure. I (as a Haskell user) expect the zipWith family to take a higher order function, and the zip family to return tuples. By that (IMHO useful convention) I could imagine renaming enum to zipIndex. But I'd be surprised if zipWithIndex would not be what it is right now.
I could imagine dropping enum if you want to simplify the API, or making it simp directly to zipWithIndex and the tuple constructor.
Currently we have
List.enum : List α → List (Nat × α)
,List.enumFrom : Nat → List α → List (Nat × α)
, andArray.zipWithIndex : Array α → Array (α × Nat)
.My current intentions are to:
List.enum
toList.zipWithIndex
List
functionsList
andArray
'szipWithIndex
a defaultfrom : Nat := 0
argument that subsumes the functionality ofenumFrom
, and removeList.enumFrom
.The text was updated successfully, but these errors were encountered: