Skip to main content
added 488 characters in body
Source Link
AZTECCO
  • 10.9k
  • 1
  • 15
  • 58

Haskell, 3534 bytes

g(a:l@(b:c:_))=a+b==c&&g l;g _=0<1

Try it online!

  • Thanks to @Laikoni for suggesting a recursive approach 1 Byte shorter

  • Original solution 35 bytes

g l@(a:b:c)=zipWith(-)c l==b:init c

Try it online!

Haskell, 35 bytes

g l@(a:b:c)=zipWith(-)c l==b:init c

Try it online!

Haskell, 34 bytes

g(a:l@(b:c:_))=a+b==c&&g l;g _=0<1

Try it online!

  • Thanks to @Laikoni for suggesting a recursive approach 1 Byte shorter

  • Original solution 35 bytes

g l@(a:b:c)=zipWith(-)c l==b:init c

Try it online!

Source Link
AZTECCO
  • 10.9k
  • 1
  • 15
  • 58

Haskell, 35 bytes

g l@(a:b:c)=zipWith(-)c l==b:init c

Try it online!