filter - SML: Filtering list non-recursively -
i'm trying filter list non-recursively i'm not sure how go going it. simple example, have list [1, 2, 3, 4, 5, 6, 7] , want filter returns list of numbers greater 3, ie [4, 5, 6, 7].
i can recursively no problem i'm stuck here. unfortunately, i'm new sml , best can think of using map don't think map made this.
you're right: map
wasn't made - list produced map
have same size list given map
.
list.filter
was made this. if phone call list.filter
function argument returns true if number greater 3, want.
list filter sml
No comments:
Post a Comment