RosettaCodeData/Task/Function-composition/Rebol/function-composition-1.rebol
2026-04-30 12:34:36 -04:00

14 lines
341 B
Text

Rebol [
Title: "Functional Composition"
URL: http://rosettacode.org/wiki/Functional_Composition
]
; "compose" means something else in Rebol, therefore I use a 'compose-functions name.
compose-functions: func [
{compose the given functions F and G}
f [any-function!]
g [any-function!]
] [
func [x] compose [(:f) (:g) x]
]