How to pass unction in scheme

Code examples

1
0

how to pass unction in scheme

/* Scheme code example for passing multiple function into a function) */

(define (square x) (* x x))
(define (mul_two x) (* 2 x))

(define (new_fun fun1 fun2) (lambda (x) (fun2 (fun1 x))))


/* The line below is to run the code in scheme  */
((new_fun square mul_two) 10)

Similar pages

Similar pages with examples

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................

Popular in the category

Popular pages with examples in the category