Shawn
02/08/2018, 6:32 PMkevinmost
02/08/2018, 6:37 PMreturn@forEach
. return
by default will return to the outermost scopeShawn
02/08/2018, 6:38 PM.forEach { return 0 }
example, is return
legal because it’s used to return from the outer function early?kristofdho
02/08/2018, 7:57 PMforEach
is the outermost scoperun
, let
, etc etckevinmost
02/08/2018, 8:07 PMerror
, it returns early with the value of 0
kristofdho
02/08/2018, 8:14 PMalllex
02/09/2018, 9:50 AM