update README.md
This commit is contained in:
@@ -188,11 +188,9 @@ iterate ;x + 1 x 0 10 # => [0 1 2 3 4 5 6 7 8 9]
|
||||
take 3 [1 2 3 4 5] # => [1 2 3]
|
||||
|
||||
:. take'while : pred Any -> Bool ?. x [Any] -> [Any]
|
||||
?? bool x
|
||||
?? pred head x
|
||||
?? && bool x pred head x
|
||||
+ head x take'while 'pred tail x
|
||||
empty
|
||||
empty
|
||||
take'while ;y < y 10 [1 3 5 7 9 11 13 15 16] # => [1 3 5 7 9]
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user