develooper Front page | perl.perl6.users | Postings from September 2018

join questions

Thread Next
From:
ToddAndMargo
Date:
September 30, 2018 11:04
Subject:
join questions
Message ID:
f3d6a19b-f98e-d74c-7639-a61cdd7a2536@zoho.com
Hi All,

https://docs.perl6.org/routine/join#(List)_routine_join

method join(List:D: $separator --> Str:D)

$ p6 'say (1, <a b c>).join("|");'
1|a b c


It states in the manual that this will happen.

Questions:

    1) why?

    2) where in the method definition does it state
       this will happen?

    3) why does this work?
          $ p6 'join( "|", <1 2 3>).say;'
          1|2|3

Many thanks,
-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About