Skip to content

NonEmpty Uncons pattern #52

Description

@cmorley191

Add an uncons pattern so I can do something like

let myThings = [1; 2; 3; 4; 5]
match myThings with
| Empty -> failwith "oh"
| NotEmpty (Uncons (head, tail)) -> printf "%i, then the rest: %A" head tail

outputs "1, then the rest: [2; 3; 4; 5]"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions