Skip to main content
Commonmark migration
Source Link

##Jelly, 8 bytes

Jelly, 8 bytes

Not as short as Dennis's answer (duh), but I'm quite proud of myself for getting the results I wanted out of Jelly.

9Rṡ3
De¢

Try it online!

Explanation:

9R    Push 1-9 to the stack
ṡ3    Slice up the stack in parts of 3, overlapping
      This gives us [1,2,3], [2,3,4], ..., [7,8,9]
D     Convert input to list ( '123' -> [1, 2, 3])
e¢    This checks to see if the decimal list is in the list of our previous link.

##Jelly, 8 bytes

Not as short as Dennis's answer (duh), but I'm quite proud of myself for getting the results I wanted out of Jelly.

9Rṡ3
De¢

Try it online!

Explanation:

9R    Push 1-9 to the stack
ṡ3    Slice up the stack in parts of 3, overlapping
      This gives us [1,2,3], [2,3,4], ..., [7,8,9]
D     Convert input to list ( '123' -> [1, 2, 3])
e¢    This checks to see if the decimal list is in the list of our previous link.

Jelly, 8 bytes

Not as short as Dennis's answer (duh), but I'm quite proud of myself for getting the results I wanted out of Jelly.

9Rṡ3
De¢

Try it online!

Explanation:

9R    Push 1-9 to the stack
ṡ3    Slice up the stack in parts of 3, overlapping
      This gives us [1,2,3], [2,3,4], ..., [7,8,9]
D     Convert input to list ( '123' -> [1, 2, 3])
e¢    This checks to see if the decimal list is in the list of our previous link.
added 79 characters in body
Source Link
steenbergh
  • 8.1k
  • 1
  • 25
  • 41

##Jelly, 8 bytes

Not as short as Dennis's answer (duh), but I'm quite proud of myself for getting the results I wanted out of Jelly.

9Rṡ3
De¢

Try it online!

Explanation:

9R    Push 1-9 to the stack
ṡ3    Slice up the stack in parts of 3, overlapping
      This gives us [1,2,3], [2,3,4], ..., [7,8,9]
D     Convert input to list ( '123' -> [1, 2, 3])
e¢    This checks to see if the decimal list is in the list of our previous link.

##Jelly, 8 bytes

Not as short as Dennis's answer (duh), but I'm quite proud of myself for getting the results I wanted out of Jelly.

9Rṡ3
De¢

Explanation

9R    Push 1-9 to the stack
ṡ3    Slice up the stack in parts of 3, overlapping
      This gives us [1,2,3], [2,3,4], ..., [7,8,9]
D     Convert input to list ( '123' -> [1, 2, 3])
e¢    This checks to see if the decimal list is in the list of our previous link.

##Jelly, 8 bytes

Not as short as Dennis's answer (duh), but I'm quite proud of myself for getting the results I wanted out of Jelly.

9Rṡ3
De¢

Try it online!

Explanation:

9R    Push 1-9 to the stack
ṡ3    Slice up the stack in parts of 3, overlapping
      This gives us [1,2,3], [2,3,4], ..., [7,8,9]
D     Convert input to list ( '123' -> [1, 2, 3])
e¢    This checks to see if the decimal list is in the list of our previous link.
added 19 characters in body
Source Link
steenbergh
  • 8.1k
  • 1
  • 25
  • 41

##Jelly, 78 bytes

Not as short as Dennis's answer (duh), but I'm quite proud of myself for getting the results I wanted out of Jelly.

9Rṡ3
De¢

Explanation

9R    Push 1-9 to the stack
ṡ3    Slice up the stack in parts of 3, overlapping
      This gives us [1,2,3], [2,3,4], ..., [7,8,9]
D  This checks to seeConvert ifinput theto inputlist (implicit input'123' to-> the[1, dyad2, `e`3])
  This checks to see if the decimal list is in the list of our previous link.

##Jelly, 7 bytes

Not as short as Dennis's answer (duh), but I'm quite proud of myself for getting the results I wanted out of Jelly.

9Rṡ3

Explanation

9R    Push 1-9 to the stack
ṡ3    Slice up the stack in parts of 3, overlapping
      This gives us [1,2,3], [2,3,4], ..., [7,8,9]
  This checks to see if the input (implicit input to the dyad `e`)
      is in the list of our previous link.

##Jelly, 8 bytes

Not as short as Dennis's answer (duh), but I'm quite proud of myself for getting the results I wanted out of Jelly.

9Rṡ3
De¢

Explanation

9R    Push 1-9 to the stack
ṡ3    Slice up the stack in parts of 3, overlapping
      This gives us [1,2,3], [2,3,4], ..., [7,8,9]
D     Convert input to list ( '123' -> [1, 2, 3])
  This checks to see if the decimal list is in the list of our previous link.
Source Link
steenbergh
  • 8.1k
  • 1
  • 25
  • 41
Loading