From 93ed763483be8b2dac728887809e341c5c60acb3 Mon Sep 17 00:00:00 2001 From: John David Pressman Date: Tue, 11 Feb 2020 17:27:27 -0800 Subject: [PATCH] Fix type of List.map and clean up its PascaLIGO example in list reference page --- gitlab-pages/docs/reference/list.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlab-pages/docs/reference/list.md b/gitlab-pages/docs/reference/list.md index 569c7f013..6cabc13d3 100644 --- a/gitlab-pages/docs/reference/list.md +++ b/gitlab-pages/docs/reference/list.md @@ -30,7 +30,7 @@ let size_ = (s: list(int)): nat => List.size(s); Alias of `List.size`. -## List.map(map_function: a' -> a', lst: a' list) : 'a list +## List.map(map_function: a' -> b', lst: a' list) : 'b list Apply an operation defined by `map_function` to each element of a list and return a list of the modified elements. @@ -38,7 +38,7 @@ a list of the modified elements. ```pascaligo group=b -function increment(const i: int): int is block { skip } with i + 1; +function increment(const i: int): int is i + 1; // Creates a new list with elements incremented by 1 const incremented_list: list(int) = list_map(increment, list 1; 2; 3; end ); ```