Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Function-composition/00-TASK.txt
Normal file
16
Task/Function-composition/00-TASK.txt
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
;Task:
|
||||
Create a function, <span style="font-family:serif">compose</span>, whose two arguments <span style="font-family:serif">''f''</span> and <span style="font-family:serif">''g''</span>, are both functions with one argument.
|
||||
|
||||
|
||||
The result of <span style="font-family:serif">compose</span> is to be a function of one argument, (lets call the argument <span style="font-family:serif">''x''</span>), which works like applying function <span style="font-family:serif"> ''f'' </span> to the result of applying function <span style="font-family:serif"> ''g'' </span> to <span style="font-family:serif"> ''x''</span>.
|
||||
|
||||
|
||||
;Example:
|
||||
<span style="font-family:serif">compose(''f'', ''g'') (''x'') = ''f''(''g''(''x''))</span>
|
||||
|
||||
|
||||
Reference: [[wp:Function composition (computer science)|Function composition]]
|
||||
|
||||
Hint: In some languages, implementing <span style="font-family:serif">compose</span> correctly requires creating a [[wp:Closure (computer science)|closure]].
|
||||
<br><br>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue