Skip to main content
Commonmark migration
Source Link

#Japt v2.0a0 -P, 14 bytes

Japt v2.0a0 -P, 14 bytes

f\l üv ñÊ®ÌiZÊ

Try it

f\l üv ñÊ®ÌiZÊ     :Implicit input of string
                   > e.g., "Kitkat Tango"

f                  :Split to an array of characters
 \l                :  Matching RegEx /[a-z]/gi
                   > ["K","i","t","k","a","t","T","a","n","g","o"]

    ü              :Sort & group (Preserves original order within each group)
     v             :  By lowercase
                   > [["a","a"],["g"],["i"],["K","k"],["n"],["o"],["t","t","T"]]

       ñ           :Sort
        Ê          :  By length
                   > [["g"],["i"],["n"],["o"],["a","a"],["K","k"],["t","t","T"]]

         ®         :Map each Z
          Ì        :  Last element of Z
                   >   ["g","i","n","o","a","k","T"]
           i       :  Prepend
            ZÊ     :    Length of Z
                   >   ["1g","1i","1n","1o","2a","2k","3T"]

                   :Implicitly join & output
                   > "1g1i1n1o2a2k3T"

#Japt v2.0a0 -P, 14 bytes

f\l üv ñÊ®ÌiZÊ

Try it

f\l üv ñÊ®ÌiZÊ     :Implicit input of string
                   > e.g., "Kitkat Tango"

f                  :Split to an array of characters
 \l                :  Matching RegEx /[a-z]/gi
                   > ["K","i","t","k","a","t","T","a","n","g","o"]

    ü              :Sort & group (Preserves original order within each group)
     v             :  By lowercase
                   > [["a","a"],["g"],["i"],["K","k"],["n"],["o"],["t","t","T"]]

       ñ           :Sort
        Ê          :  By length
                   > [["g"],["i"],["n"],["o"],["a","a"],["K","k"],["t","t","T"]]

         ®         :Map each Z
          Ì        :  Last element of Z
                   >   ["g","i","n","o","a","k","T"]
           i       :  Prepend
            ZÊ     :    Length of Z
                   >   ["1g","1i","1n","1o","2a","2k","3T"]

                   :Implicitly join & output
                   > "1g1i1n1o2a2k3T"

Japt v2.0a0 -P, 14 bytes

f\l üv ñÊ®ÌiZÊ

Try it

f\l üv ñÊ®ÌiZÊ     :Implicit input of string
                   > e.g., "Kitkat Tango"

f                  :Split to an array of characters
 \l                :  Matching RegEx /[a-z]/gi
                   > ["K","i","t","k","a","t","T","a","n","g","o"]

    ü              :Sort & group (Preserves original order within each group)
     v             :  By lowercase
                   > [["a","a"],["g"],["i"],["K","k"],["n"],["o"],["t","t","T"]]

       ñ           :Sort
        Ê          :  By length
                   > [["g"],["i"],["n"],["o"],["a","a"],["K","k"],["t","t","T"]]

         ®         :Map each Z
          Ì        :  Last element of Z
                   >   ["g","i","n","o","a","k","T"]
           i       :  Prepend
            ZÊ     :    Length of Z
                   >   ["1g","1i","1n","1o","2a","2k","3T"]

                   :Implicitly join & output
                   > "1g1i1n1o2a2k3T"
deleted 20 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#Japt v2.0a0 -P, 14 bytes

f\l üv ñÊ®ÌiZÊ

Try it

f\l üv ñÊ®ÌiZÊ
                   :Implicit input of string
                   > e.g., "Kitkat Tango"

f                  :Split to an array of characters
 \l                :  Matching RegEx /[a-z]/gi
                   > ["K","i","t","k","a","t","T","a","n","g","o"]

    ü              :Sort & group (Preserves original order within each group)
     v             :  By lowercase
                   > [["a","a"],["g"],["i"],["K","k"],["n"],["o"],["t","t","T"]]

       ñ           :Sort
        Ê          :  By length
                   > [["g"],["i"],["n"],["o"],["a","a"],["K","k"],["t","t","T"]]

         ®         :Map each Z
          Ì        :  Last element of Z
                   >   ["g","i","n","o","a","k","T"]
           i       :  Prepend
            ZÊ     :    Length of Z
                   >   ["1g","1i","1n","1o","2a","2k","3T"]

                   :Implicitly join & output
                   > "1g1i1n1o2a2k3T"

#Japt v2.0a0 -P, 14 bytes

f\l üv ñÊ®ÌiZÊ

Try it

f\l üv ñÊ®ÌiZÊ
                   :Implicit input of string
                   > e.g., "Kitkat Tango"

f                  :Split to an array of characters
 \l                :  Matching RegEx /[a-z]/gi
                   > ["K","i","t","k","a","t","T","a","n","g","o"]

    ü              :Sort & group (Preserves original order within each group)
     v             :  By lowercase
                   > [["a","a"],["g"],["i"],["K","k"],["n"],["o"],["t","t","T"]]

       ñ           :Sort
        Ê          :  By length
                   > [["g"],["i"],["n"],["o"],["a","a"],["K","k"],["t","t","T"]]

         ®         :Map each Z
          Ì        :  Last element of Z
                   >   ["g","i","n","o","a","k","T"]
           i       :  Prepend
            ZÊ     :    Length of Z
                   >   ["1g","1i","1n","1o","2a","2k","3T"]

                   :Implicitly join & output
                   > "1g1i1n1o2a2k3T"

#Japt v2.0a0 -P, 14 bytes

f\l üv ñÊ®ÌiZÊ

Try it

f\l üv ñÊ®ÌiZÊ     :Implicit input of string
                   > e.g., "Kitkat Tango"

f                  :Split to an array of characters
 \l                :  Matching RegEx /[a-z]/gi
                   > ["K","i","t","k","a","t","T","a","n","g","o"]

    ü              :Sort & group (Preserves original order within each group)
     v             :  By lowercase
                   > [["a","a"],["g"],["i"],["K","k"],["n"],["o"],["t","t","T"]]

       ñ           :Sort
        Ê          :  By length
                   > [["g"],["i"],["n"],["o"],["a","a"],["K","k"],["t","t","T"]]

         ®         :Map each Z
          Ì        :  Last element of Z
                   >   ["g","i","n","o","a","k","T"]
           i       :  Prepend
            ZÊ     :    Length of Z
                   >   ["1g","1i","1n","1o","2a","2k","3T"]

                   :Implicitly join & output
                   > "1g1i1n1o2a2k3T"
added 99 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#Japt#Japt v2.0a0 -P-P, 14 bytes

f\l üv ñÊ®ÌiZÊ

Try it

f\l üv ñÊ®ÌiZÊ
                   :Implicit input of string
                   > e.g., "Kitkat Tango"

f                  :Split to an array of characters
 \l                :  Matching RegEx /[a-z]/gi
                   > ["K","i","t","k","a","t","T","a","n","g","o"]

    ü              :Sort & group (Preserves original order within each group)
     v             :  By lowercase
                   > [["a","a"],["g"],["i"],["K","k"],["n"],["o"],["t","t","T"]]

       ñ           :Sort
        Ê          :  By length
                   > [["g"],["i"],["n"],["o"],["a","a"],["K","k"],["t","t","T"]]

         ®         :Map each Z
          Ì        :  Last element of Z
                   >   ["g","i","n","o","a","k","T"]
           i       :  Prepend
            ZÊ     :    Length of Z
                   >   ["1g","1i","1n","1o","2a","2k","3T"]

                   :Implicitly join & output
                   > "1g1i1n1o2a2k3T"

#Japt v2.0a0 -P, 14 bytes

f\l üv ñÊ®ÌiZÊ

Try it

f\l üv ñÊ®ÌiZÊ
                   :Implicit input of string
                   > e.g., "Kitkat Tango"

f                  :Split to an array of characters
 \l                :  Matching RegEx /[a-z]/gi
                   > ["K","i","t","k","a","t","T","a","n","g","o"]

    ü              :Sort & group (Preserves original order within each group)
     v             :  By lowercase
                   > [["a","a"],["g"],["i"],["K","k"],["n"],["o"],["t","t","T"]]

       ñ           :Sort
        Ê          :  By length
                   > [["g"],["i"],["n"],["o"],["a","a"],["K","k"],["t","t","T"]]

         ®         :Map each Z
          Ì        :  Last element of Z
                   >   ["g","i","n","o","a","k","T"]
           i       :  Prepend
            ZÊ     :    Length of Z
                   >   ["1g","1i","1n","1o","2a","2k","3T"]

                   :Implicitly join & output
                   > "1g1i1n1o2a2k3T"

#Japt v2.0a0 -P, 14 bytes

f\l üv ñÊ®ÌiZÊ

Try it

f\l üv ñÊ®ÌiZÊ
                   :Implicit input of string
                   > e.g., "Kitkat Tango"

f                  :Split to an array of characters
 \l                :  Matching RegEx /[a-z]/gi
                   > ["K","i","t","k","a","t","T","a","n","g","o"]

    ü              :Sort & group (Preserves original order within each group)
     v             :  By lowercase
                   > [["a","a"],["g"],["i"],["K","k"],["n"],["o"],["t","t","T"]]

       ñ           :Sort
        Ê          :  By length
                   > [["g"],["i"],["n"],["o"],["a","a"],["K","k"],["t","t","T"]]

         ®         :Map each Z
          Ì        :  Last element of Z
                   >   ["g","i","n","o","a","k","T"]
           i       :  Prepend
            ZÊ     :    Length of Z
                   >   ["1g","1i","1n","1o","2a","2k","3T"]

                   :Implicitly join & output
                   > "1g1i1n1o2a2k3T"
added 553 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94
Loading
added 447 characters in body; added 49 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94
Loading
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94
Loading