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 (960 forks)batch import
help wanted

Repository metrics

Stars
 (21,417 stars)
PR merge metrics
 (Avg merge 10d 19h) (69 merged PRs in 30d)

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