Skip to main content
Commonmark migration
Source Link

#K, 10 bytes

K, 10 bytes

~/1_'-':'=

Note this is a function, so it needs to be called:

  ~/1_'-':'="aaaaaabbbbbb"
1
  ~/1_'-':'="aba"
0

= groups its arguments, so ="aaaaaabbbbbb" produces "ab"!(0 1 2 3 4 5;6 7 8 9 10 11) and ="aba" returns "ab"!(0 2;,1)

-':' is minus eachprior each. -': is a good way to find out if a series is increasing (or decreasing). -':'="aaaaaabbbbbb" gives us "ab"!(0 1 1 1 1 1;6 1 1 1 1 1) and -':'="aba" gives us "ab"!(0 2;,1)

1_' is one drop each which pops the first element off each list.

~/ is match over.

#K, 10 bytes

~/1_'-':'=

Note this is a function, so it needs to be called:

  ~/1_'-':'="aaaaaabbbbbb"
1
  ~/1_'-':'="aba"
0

= groups its arguments, so ="aaaaaabbbbbb" produces "ab"!(0 1 2 3 4 5;6 7 8 9 10 11) and ="aba" returns "ab"!(0 2;,1)

-':' is minus eachprior each. -': is a good way to find out if a series is increasing (or decreasing). -':'="aaaaaabbbbbb" gives us "ab"!(0 1 1 1 1 1;6 1 1 1 1 1) and -':'="aba" gives us "ab"!(0 2;,1)

1_' is one drop each which pops the first element off each list.

~/ is match over.

K, 10 bytes

~/1_'-':'=

Note this is a function, so it needs to be called:

  ~/1_'-':'="aaaaaabbbbbb"
1
  ~/1_'-':'="aba"
0

= groups its arguments, so ="aaaaaabbbbbb" produces "ab"!(0 1 2 3 4 5;6 7 8 9 10 11) and ="aba" returns "ab"!(0 2;,1)

-':' is minus eachprior each. -': is a good way to find out if a series is increasing (or decreasing). -':'="aaaaaabbbbbb" gives us "ab"!(0 1 1 1 1 1;6 1 1 1 1 1) and -':'="aba" gives us "ab"!(0 2;,1)

1_' is one drop each which pops the first element off each list.

~/ is match over.

Post Undeleted by geocar
Rewrote. Completely misread the first question.
Source Link
geocar
  • 244
  • 2
  • 6

#K, 810 bytes

~/+2 0N#1_'-':'=

Note this is a function, so it needs to be called:

  ~/+2 0N#"aaaaaabbbbbb"1_'-':'="aaaaaabbbbbb"
1
  ~/+2 0N#"aba"1_'-':'="aba"
0

= groups its arguments, so ="aaaaaabbbbbb" produces "ab"!(0 1 2 3 4 5;6 7 8 9 10 11) and ="aba" returns "ab"!(0 2;,1)

-':' is minus eachprior each. -': is a good way to find out if a series is increasing (or decreasing). -':'="aaaaaabbbbbb" gives us "ab"!(0 1 1 1 1 1;6 1 1 1 1 1) and -':'="aba" gives us "ab"!(0 2;,1)

1_' is one drop each which pops the first element off each list.

~/ is match over.

#K, 8 bytes

~/+2 0N#

Note this is a function, so it needs to be called:

  ~/+2 0N#"aaaaaabbbbbb"
1
  ~/+2 0N#"aba"
0

#K, 10 bytes

~/1_'-':'=

Note this is a function, so it needs to be called:

  ~/1_'-':'="aaaaaabbbbbb"
1
  ~/1_'-':'="aba"
0

= groups its arguments, so ="aaaaaabbbbbb" produces "ab"!(0 1 2 3 4 5;6 7 8 9 10 11) and ="aba" returns "ab"!(0 2;,1)

-':' is minus eachprior each. -': is a good way to find out if a series is increasing (or decreasing). -':'="aaaaaabbbbbb" gives us "ab"!(0 1 1 1 1 1;6 1 1 1 1 1) and -':'="aba" gives us "ab"!(0 2;,1)

1_' is one drop each which pops the first element off each list.

~/ is match over.

Post Deleted by geocar
Source Link
geocar
  • 244
  • 2
  • 6

#K, 8 bytes

~/+2 0N#

Note this is a function, so it needs to be called:

  ~/+2 0N#"aaaaaabbbbbb"
1
  ~/+2 0N#"aba"
0