I process the sequence in clojure. I would like to get the elements until the predicate function is true. How to do it?
You can use take-while along with not
take-while
not
user=> (take-while (comp not even?) [3 9 2 4 6 10 1 2]) (3 9)
Source: https://habr.com/ru/post/919649/More articles:How to convert anonymous function to symbolic function in MATLAB? - functionShould I explicitly bind regular classes with Autofac? - c #Addto a node in SVG with D3 - d3.jsHow to control the expiration of a trial version for an Android app? - androiddecodeURI not working fully - javascriptDoes the browser support Wii WebSockets? - websocketalgorithm - minimizing boolean expressions - pythonTwo file descriptors from different points in the process to the same entry in the open file table - cParsing a text file in Python (pyparsing) - pythonHow to use Group By based on Case statement in Oracle? - sqlAll Articles