From 808bf110158304a655b91ee38aba9f2c89fc5b74 Mon Sep 17 00:00:00 2001 From: Sipher <77928770+Sipher@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:53:34 -0300 Subject: [PATCH] Update src/fun/builtins.bend Co-authored-by: Nicolas Abril --- src/fun/builtins.bend | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fun/builtins.bend b/src/fun/builtins.bend index 73579565..929ef0cd 100644 --- a/src/fun/builtins.bend +++ b/src/fun/builtins.bend @@ -47,9 +47,9 @@ List/filter (List/Cons x xs) pred = (List/filter xs pred) } -## Recursively sums all elements in a list of natural numbers. +## Recursively sums all elements in a list of native numbers. # If the list is empty, returns 0. -# List/sum (xs: List(n24)) -> n24 +# List/sum (xs: List(Number(a))) -> Number(a) List/sum (List/Nil) = 0 List/sum (List/Cons x xs) = (+ x (List/sum xs))