type-challenges/questions/18-easy-tuple-length
沧浪 8ca8cc481b
feat(question): add tuple length (#17)
* feat(question): add tuple length

* Update questions/18-easy-tuple-length/info.yml

Accept suggestion

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>

* refactor(question): add tags tuple

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2020-07-29 18:54:26 +08:00
..

Tuple length easy #tuple

by sinoon @sinoon

Take the Challenge

For given a tuple, you need create a generic Length, pick the length of the tuple

For example

type tesla = ['tesla', 'model 3', 'model X', 'model Y']
type spaceX = ['FALCON 9', 'FALCON HEAVY', 'DRAGON', 'STARSHIP', 'HUMAN SPACEFLIGHT']

type teslaLength = Length<tesla>  // expected 4
type spaceXLength = Length<spaceX> // expected 5

Back Check out Solutions Share your Solutions