Wednesday, 5 July 2017

julia's filter


In []: xlist = [1,2,3,4,5,6,7,8,9]  
       xmin = 3; xmax = 7;  
       filter!(e->(e < xmax) & (e > xmin), xlist)  
Out[]: 3-element Array{Int64,1}:  
       4  
       5  
       6  

No comments:

Post a Comment