Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
extensions [2019/05/29 16:47]
a.leofreddi [New functions]
extensions [2019/05/29 16:48] (current)
a.leofreddi [New functions]
Line 69: Line 69:
   - We declare the ''​length''​ function, accepting a single ''​String''​ argument and returning an ''​Integer'';​   - We declare the ''​length''​ function, accepting a single ''​String''​ argument and returning an ''​Integer'';​
   - When evaluated, this function will at first invoke its argument (which we know being an ''​Evaluable<​String>''​ due to the functions'​ prototype - hence the cast);   - When evaluated, this function will at first invoke its argument (which we know being an ''​Evaluable<​String>''​ due to the functions'​ prototype - hence the cast);
-  - We map each returned value (which is a string) to an integer via a lambda, in this case '​String::​length';​+  - We map each returned value (which is a string) to an integer via a lambda, in this case ''​String::​length'';
   - We make the outcome upscalable according to the return type - this is a common snippet for most functions.   - We make the outcome upscalable according to the return type - this is a common snippet for most functions.
  
  • extensions.txt
  • Last modified: 2019/05/29 16:48
  • by a.leofreddi