scheme function declaration
function.scm
In (cube x), cube is the function name, x is the function parameter.
(* x x x) is the function body.
(cube 10) calls the function with 10 as the function parameter.
(define (cube x) (* x x x)) (cube 10)
Output:
;Loading "function.scm"... done ;Value: 1000
Search within Codexpedia
Custom Search
Search the entire web
Custom Search
Related Posts