sisoputnfrba / so-commons-library

TADs de uso comun en aplicaciones desarrolladas en C
http://sisoputnfrba.github.io/so-commons-library/
GNU General Public License v3.0
106 stars 174 forks source link

Feature list_fold #104

Closed ShiroAka closed 6 years ago

ShiroAka commented 6 years ago

Adding new lists function called 'list_fold' which lets you fold a list into a single value, with a given function. That function should accept 2 values of the data type found in the list, and return a value of the same data type.

gastonprieto commented 6 years ago

La función fold en varios lenguajes, recibe la semilla/valor inicial.

Si queremos que reciba como valor inicial el primer elemento, la llamaría fold1 o fold_with_head algo por el estilo.