Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Function Values and Composition

A handle can be stored and called. Here a generic identity function is specialized before its handle is selected.

identity = <T>(value:T):>T => value
let callback = @identity<int64>
printl(callback(42))

Expected output:

42

Run the example from a file with dewy example.dewy. Its exact output is checked by the website build on the native release target.

Design boundary. The Function Values and Composition reference specifies the complete language rules. A passing example covers this program only. See generated coverage for related acceptance programs and unmeasured areas.