Gaia, 14(削除) 14 (削除ここまで) 12 bytes
Defines a function which takes a nested list and returns an integer.
⟨:ṙ'[Ė⟨←:C⟨←)⟩¿⟩¦Π
⟨ ⟩¦ # map over each element in the input
: # duplicate the TOS
ṙ'[Ė # check if the current value is a list:
ṙ # cast to string
'[ # push string "["
Ė # is this contained in the string representation?
⟨ ⟩¿ # if the TOS is truthy:
←) # recursively call the function und add 1
Π # after the map: take the product
⟨ ⟩¦ # map over each element in the input
:: # two copies of the TOS
C # compare for two ints (0), count occurences for two lists (1)
⟨ ⟩¿ # if the TOS is truthy:
←) # recursively call the function and add 1
Π # after the map: take the product
Gaia, 14 bytes
Defines a function which takes a nested list and returns an integer.
⟨:ṙ'[Ė⟨←)⟩¿⟩¦Π
⟨ ⟩¦ # map over each element in the input
: # duplicate the TOS
ṙ'[Ė # check if the current value is a list:
ṙ # cast to string
'[ # push string "["
Ė # is this contained in the string representation?
⟨ ⟩¿ # if the TOS is truthy:
←) # recursively call the function und add 1
Π # after the map: take the product
Gaia, (削除) 14 (削除ここまで) 12 bytes
Defines a function which takes a nested list and returns an integer.
⟨::C⟨←)⟩¿⟩¦Π
⟨ ⟩¦ # map over each element in the input
:: # two copies of the TOS
C # compare for two ints (0), count occurences for two lists (1)
⟨ ⟩¿ # if the TOS is truthy:
←) # recursively call the function and add 1
Π # after the map: take the product
Gaia, 14 bytes
Defines a function which takes a nested list and returns an integer.
⟨:ṙ'[Ė⟨←)⟩¿⟩¦Π
⟨ ⟩¦ # map over each element in the input
: # duplicate the TOS
ṙ'[Ė # check if the current value is a list:
ṙ # cast to string
'[ # push string "["
Ė # is this contained in the string representation?
⟨ ⟩¿ # if the TOS is truthy:
←) # recursively call the function und add 1
Π # after the map: take the product