RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
rakulang,

@RogerBW

Solution to 1. with shortcutting:

sub uniqueoccurrences(@a) {
@a.repeated.head =:= Nil
}

https://docs.raku.org/type/Any#method_repeated

Also note that The Raku Programming Language uses the tag, to not interfere with the good people doing Raku pottery.

RogerBW,
@RogerBW@emacs.ch avatar

@rakulang Thanks, I'll tweak the tag for future posts. I tend not to use the sexier language features in favour of a portable polyglot approach (also because I find them hard to parse when I come back to the code later).

RogerBW, to raku
@RogerBW@emacs.ch avatar
RogerBW, to raku
@RogerBW@emacs.ch avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • GTA5RPClips
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • lostlight
  • All magazines