Programming-Idioms

History of Idiom 43 > diff from v18 to v19

Edit summary for version 19 :

Version 18

2015-09-04, 17:51:54

Version 19

2015-09-04, 17:52:27

Idiom #43 Break outer loop

Look for a negative value v in 2D integer matrix m. Print it and stop searching.

Idiom #43 Break outer loop

Look for a negative value v in 2D integer matrix m. Print it and stop searching.

Code
(print.head.filter(<0).concat)m
Code
(print.head.filter(<0).concat)m
Comments bubble
Haskell's lazy evaluator takes care of breaking the loop when no more searching is needed.
Comments bubble
Haskell's lazy evaluator takes care of breaking the loops when no more searching is needed.