RosettaCodeData/Task/Function-composition/REBOL/function-composition-1.rebol
2018-08-17 15:15:24 +01: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]
]