From cce243e513e3547139237b5d450c28f2b3a51d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Rowicki?= <35342116+radrow@users.noreply.github.com> Date: Wed, 28 Aug 2019 14:17:30 +0200 Subject: [PATCH] Remove find_all from stdlib It was just a duplicated `filter` --- priv/stdlib/List.aes | 5 ----- 1 file changed, 5 deletions(-) diff --git a/priv/stdlib/List.aes b/priv/stdlib/List.aes index cdd2464..ddef362 100644 --- a/priv/stdlib/List.aes +++ b/priv/stdlib/List.aes @@ -23,11 +23,6 @@ namespace List = [] => None h::t => if(p(h)) Some(h) else find(p, t) - function find_all(p : 'a => bool, l : list('a)) : list('a) = find_all_(p, l, []) - private function find_all_(p : 'a => bool, l : list('a), acc : list('a)) : list('a) = switch(l) - [] => reverse(acc) - h::t => find_all_(p, t, if(p(h)) h::acc else acc) - function find_indices(p : 'a => bool, l : list('a)) : list(int) = find_indices_(p, l, 0, []) private function find_indices_( p : 'a => bool , l : list('a)