Hacker News .hn
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
u320
on March 29, 2023
|
parent
|
context
|
favorite
| on:
Effing-mad, an effect library for Rust
If Rust had algebraic effects, your example would be:
fn foo<T,E>(closure: impl FnMut(&T) -> bool | E) -> Option<T> | E
All that's needed syntax-wise would be a way to attach one or more type parameters to a function type. (I used "|" here but it could be anything)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: