Skip to content

Commit

Permalink
Add lcomposition fixity to support (>>) in the stdlib (#2847)
Browse files Browse the repository at this point in the history
The stdlib composition function `∘` has fixity `composition` which means
it is right associative.

We will rename `∘` to `<<` in the stdlib and add a new function:

```
>> {a b c} : (a -> b) -> (b -> c) -> a -> c
```

for consistency with `<<` this should be left associative.

This is not a breaking change to package-base so we don't need to
increment the version number.
  • Loading branch information
paulcadman authored Jun 20, 2024
1 parent 285b237 commit a5cd3c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/package-base/Juvix/Builtin/V1/Fixity.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ syntax fixity additive := binary {assoc := left; above := [comparison; range; co
syntax fixity multiplicative := binary {assoc := left; above := [additive]};

syntax fixity composition := binary {assoc := right; above := [multiplicative]};
syntax fixity lcomposition := binary {assoc := left; above := [multiplicative]};

0 comments on commit a5cd3c9

Please sign in to comment.