gleam-lang/gleam

Allow function literals in constants

Open

#3942 aperta il 2 dic 2024

Vedi su GitHub
 (2 commenti) (2 reazioni) (0 assegnatari)Rust (960 fork)batch import
help wanted

Metriche repository

Star
 (21.417 star)
Metriche merge PR
 (Merge medio 10g 19h) (69 PR mergiate in 30 g)

Descrizione

The ability to do something like this would be nice:

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

Guida contributor