icicle-lang / icicle-ambiata

A streaming query language.
BSD 3-Clause "New" or "Revised" License
57 stars 11 forks source link

Use pattern guards for `filter` in sorbet. #660

Closed HuwCampbell closed 6 years ago

HuwCampbell commented 6 years ago

A common use case has been

filter
  is_some x
in
  let
    x' = box x
  in
    mean x'

which isn't very pleasant. I see no reason why we shouldn't write

filter
  Some x' <- x
in
  mean x'
justanotherdot commented 6 years ago

So sorbet had some work done it already?

HuwCampbell commented 6 years ago

The bnf and concrete parser have been written.