Skip to main content
added 58 characters in body
Source Link
lynn
  • 69.2k
  • 11
  • 133
  • 283

Haskell, 62 bytes

import Data.List
(%)=isInfixOf
f x=not(",0"%x||"[0"%x)&&x<"[]"

Try it online!

Haskell doesn’t have jagged arrays, so thisThis is a function String -> Bool. Haskell’s lists are heterogenous, so there’s no built-in way to represent lists like [0, [0]].

Haskell, 62 bytes

import Data.List
(%)=isInfixOf
f x=not(",0"%x||"[0"%x)&&x<"[]"

Try it online!

Haskell doesn’t have jagged arrays, so this is a function String -> Bool.

Haskell, 62 bytes

import Data.List
(%)=isInfixOf
f x=not(",0"%x||"[0"%x)&&x<"[]"

Try it online!

This is a function String -> Bool. Haskell’s lists are heterogenous, so there’s no built-in way to represent lists like [0, [0]].

deleted 8 characters in body
Source Link
lynn
  • 69.2k
  • 11
  • 133
  • 283

Haskell, 62 bytes

import Data.List
(%)=isInfixOf
f x=not(" ,0"%x||"[0"%x)&&x<"[]"

Try it online!Try it online!

Haskell doesn’t have jagged arrays, so this is a function String -> Bool.

Haskell, 62 bytes

import Data.List
(%)=isInfixOf
f x=not(" 0"%x||"[0"%x)&&x<"[]"

Try it online! Haskell doesn’t have jagged arrays, so this is a function String -> Bool.

Haskell, 62 bytes

import Data.List
(%)=isInfixOf
f x=not(",0"%x||"[0"%x)&&x<"[]"

Try it online!

Haskell doesn’t have jagged arrays, so this is a function String -> Bool.

Source Link
lynn
  • 69.2k
  • 11
  • 133
  • 283

Haskell, 62 bytes

import Data.List
(%)=isInfixOf
f x=not(" 0"%x||"[0"%x)&&x<"[]"

Try it online! Haskell doesn’t have jagged arrays, so this is a function String -> Bool.