Post History
Jelly, 9 bytes Rȧ_@Rп@L Try it online! Takes $t_1$ on the left and $t_2$ on the right. R}ȧ_@RпL works given the arguments in the opposite order. R Ascending range from 1 to t_1 (...
Answer
#2: Post edited
- # [Jelly], 9 bytes
- Rȧ_@Rп@L
- [Try it online!][TIO-kjjywv5m]
- [Jelly]: https://github.com/DennisMitchell/jelly
- [TIO-kjjywv5m]: https://tio.run/##y0rNyan8/z/oxPJ4h6DDEw7td/D5f3i5/qOmNZH//0cbGhnomBvG6kQbGhjqmBgBGaYGBjomlpZAlrGFuQ5IylhH19DIAsjQNdIxBlIGOgaxAA "Jelly – Try It Online"
Takes $t_1$ on the left and $t_2$ on the right. [`R}ȧ_@RпL`](https://tio.run/##y0rNyan8/z@o9sTyeIegwxMO7ff5f3i5g/6jpjWR//9HGxoZ6JgbxupEGxoY6pgYARmmBgY6JpaWQJaxhbkOSMpYR9fQyALI0DXSMQZSBjoGsQA) works given the arguments in the opposite order.
- # [Jelly], 9 bytes
- Rȧ_@Rп@L
- [Try it online!][TIO-kjjywv5m]
- [Jelly]: https://github.com/DennisMitchell/jelly
- [TIO-kjjywv5m]: https://tio.run/##y0rNyan8/z/oxPJ4h6DDEw7td/D5f3i5/qOmNZH//0cbGhnomBvG6kQbGhjqmBgBGaYGBjomlpZAlrGFuQ5IylhH19DIAsjQNdIxBlIGOgaxAA "Jelly – Try It Online"
- Takes $t_1$ on the left and $t_2$ on the right. [`R}ȧ_@RпL`](https://tio.run/##y0rNyan8/z@o9sTyeIegwxMO7ff5f3i5g/6jpjWR//9HGxoZ6JgbxupEGxoY6pgYARmmBgY6JpaWQJaxhbkOSMpYR9fQyALI0DXSMQZSBjoGsQA) works given the arguments in the opposite order.
- ```
- R Ascending range from 1 to t_1 (truthy if positive),
- ȧ and:
- п collecting intermediate results, loop while
- R positive
- @ on the reversed arguments:
- _ subtract
- @ the first from the second.
- L Return the length of the conjunction.
- ```
- `¿` and family, given a dyad, replace the right argument with the previous left argument on each successive iteration. This is incredibly bothersome for some tasks, but perfect for working with this exact kind of sequence.
#1: Initial revision
# [Jelly], 9 bytes Rȧ_@Rп@L [Try it online!][TIO-kjjywv5m] [Jelly]: https://github.com/DennisMitchell/jelly [TIO-kjjywv5m]: https://tio.run/##y0rNyan8/z/oxPJ4h6DDEw7td/D5f3i5/qOmNZH//0cbGhnomBvG6kQbGhjqmBgBGaYGBjomlpZAlrGFuQ5IylhH19DIAsjQNdIxBlIGOgaxAA "Jelly – Try It Online" Takes $t_1$ on the left and $t_2$ on the right. [`R}ȧ_@RпL`](https://tio.run/##y0rNyan8/z@o9sTyeIegwxMO7ff5f3i5g/6jpjWR//9HGxoZ6JgbxupEGxoY6pgYARmmBgY6JpaWQJaxhbkOSMpYR9fQyALI0DXSMQZSBjoGsQA) works given the arguments in the opposite order.