Skip to content

transpose? #225

@newlandsvalley

Description

@newlandsvalley

Is there any interest in adding transpose to arrays? Not sure what would be a good implementation but possibly something along the lines of:

transpose :: forall a. Array (Array a) -> Array (Array a)
transpose x = 
  case head x of 
    Just [_] -> 
      x
    _ -> 
      (mapMaybe head x) : transpose (mapMaybe tail x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions