Skip to main content

Timeline for Tips for golfing in <all languages>

Current License: CC BY-SA 3.0

12 events
when toggle format what by license comment
Mar 16, 2023 at 22:34 comment added ShadowRanger @mbomb007: It does, but the folks mentioning what you'd do in Python were pointing out that the example golfs better using chained conditionals.
Jan 26, 2017 at 14:55 comment added mbomb007 Python also has all().
Apr 5, 2016 at 18:36 comment added Cyoce JavaScript (ES6) lets you do [someArray].every(_=>_) for and and [someArray].some(_=>_) for or. Of course, if you use this more than once, you should alias i=_=>_
Dec 24, 2015 at 15:53 comment added JohnE In K, "all" is &/ (AND reduce) and "any" is |/ (OR reduce). Most APL derivatives have an equivalent juxtaposition.
Jul 28, 2015 at 23:40 comment added proud haskeller @Sp3000 actually, if 10>a>0>a+2 and a+b==4: because a+3<1 is a+2<0. which on second thought, isn't possible, so if 0:. XP
Feb 20, 2015 at 2:41 history wiki removed Doorknob
Nov 29, 2014 at 17:31 comment added proud haskeller @PeterTaylor Haskell has too
Nov 29, 2014 at 3:30 comment added Sp3000 Although if this were Python you'd be using something like if 10>a>0 and a+b==4>1>a+3:
Oct 6, 2014 at 19:22 comment added kernigh Ruby has it. [a>0,a<10,a+b==4,a+3<1].all?
Sep 11, 2014 at 13:50 comment added Peter Taylor Which languages have an all(array-of-Booleans) built-in?
Sep 11, 2014 at 13:18 comment added stokastic That's a cool one, I'll have to try it!
Aug 8, 2014 at 14:13 history answered squeakyclean CC BY-SA 3.0