ekmett / ekmett/linear

Is there interest in pattern synonyms for vector component swizzling?

Open
#85 3 comments 0 reactions 0 assignees View on GitHub
feature request question
Dominant language
Haskell
Stars
220
Forks
55
PR merge metrics
No merged PRs in 30d

Description

Thinking of things such as

``` haskell
pattern X x <- (preview _x -> Just x)
pattern Y y <- (preview _y -> Just y)
```

probably with the corresponding `review` in as well. I say swizzling, as you could also have

``` haskell
pattern XY x y <- (preview _xy -> Just (x,y))
pattern YX y x <- (preview _yx -> Just (y,x))
```

If people think this is a useful addition, I will put together a pull request.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.