Extremely Over-Nested

Published by Joshua Señoron in

Create a function that returns the original value from a list with too many sub-lists.

Examples

de_nest([[[[[[[[[[[[3]]]]]]]]]]]]) ➞ 3

de_nest([[[[[[[True]]]]]]]) ➞ True

de_nest([[[[[[[[[[[[[[[[["edabit"]]]]]]]]]]]]]]]]]) ➞ "edabit"

Notes

You only need to retrieve one element.

Watch a quick demo on how Edabit works.