gleam-lang/gleam

Allow function literals in constants

Open

#3,942 opened on Dec 2, 2024

View on GitHub
 (2 comments) (2 reactions) (0 assignees)Rust (21,417 stars) (960 forks)batch import
help wanted

Description

The ability to do something like this would be nice:

type FunctionWrapper {
  FunctionWrapper(fn(String) -> Int)
}
const my_function = FunctionWrapper(fn(something) { 0 })

Contributor guide