| disbot11 | <jubilatious1_98524> ~ % raku -e 'my @a = (1,2,3,1,2,3).rotor(3 => -2); say $_, .map( * < * > * ) for @a;' (1 2 3)(False) (2 3 1)(True) (3 1 2)(False) (1 2 3)(False) | 00:18 | |
| <jubilatious1_98524> @librasteve ~ % raku -e '(1,2,3,1,2,3).rotor(3 => -2) andthen say $_>>.map( * < * > * );' ((False) (True) (False) (False)) | 00:19 | ||
| <jubilatious1_98524> @librasteve ~ % raku -e 'my @a = (1,2,3,1,2,3).rotor(3).map(*.rotate); for @a { print "($_) "; .map( * < * > * ).say };' (2 3 1) (True) (2 3 1) (True) | 00:28 | ||
|
01:12
lizmat_ joined
01:15
lizmat left
01:49
arkiuat joined
04:46
stanrifkin_ joined
04:49
stanrifkin left
07:05
arkiuat left
07:38
arkiuat joined
07:47
arkiuat left
07:59
arkiuat joined
08:04
arkiuat left
08:29
arkiuat joined
08:33
arkiuat left
08:47
arkiuat joined
08:57
lizmat_ left
08:58
lizmat joined
|
|||
| disbot11 | <librasteve> okay … so this line scans the values to find every local peak in a list of values? | 08:59 | |
| <librasteve> thanks for the update | 09:02 | ||
|
09:06
kjp_ joined
09:07
kjp left
09:49
arkiuat left
10:02
arkiuat joined
10:06
arkiuat left
10:27
arkiuat joined
10:32
arkiuat left
10:46
arkiuat joined
10:51
arkiuat left
11:16
arkiuat joined
11:25
arkiuat left
11:30
arkiuat joined
11:35
arkiuat left
11:47
arkiuat joined
11:51
arkiuat left
12:11
arkiuat joined
12:49
arkiuat left
13:04
arkiuat joined
13:09
arkiuat left
13:21
arkiuat joined
14:05
arkiuat left
14:17
arkiuat joined
14:21
arkiuat left
14:35
arkiuat joined
15:20
arkiuat left
15:31
arkiuat joined
15:35
arkiuat left
16:02
arkiuat joined
16:38
human-blip left
16:41
human-blip joined
16:56
librasteve_ left
|
|||
| disbot11 | <jubilatious1_98524> @librasteve fine for .weekly, but with the caveat that the .map(* < * > * ) only works for three element lists. Of course, you can reorder the map to check ascending values (or descending values), e.g.: | 17:25 | |
| <jubilatious1_98524> raku -e 'my @a = (1,2,3,1,2,3).rotor(3 => -2); say $_, .map( * < * < * ) for @a;' (1 2 3)(True) (2 3 1)(False) (3 1 2)(False) (1 2 3)(True) | 17:26 | ||
| <jubilatious1_98524> ~ % raku -e 'my @a = (1,2,3,4,1,2,3,4).rotor(4 => -3); say $_, .map( * < * < * < * ) for @a;' (1 2 3 4)(True) (2 3 4 1)(False) (3 4 1 2)(False) (4 1 2 3)(False) (1 2 3 4)(True) | 17:27 | ||
| <jubilatious1_98524> @librasteve ^ handling a 4-element list. | 17:29 | ||
|
18:02
librasteve_ joined
18:24
stanrifkin_ left
|
|||