I don't get why take in this case

will produce that result

instead of

Is it the right behavior?
yes it is correct. Consider the case where you have
const xs = [[1, 2], [3, 4], [5, 6]]
take(2, xs) //=> [[1, 2], [3, 4]]
therefore,
take(1, xs) //=> [[1, 2]]
the contract of take is that you tell it how many elements to take and a list to take from, and it will return a list of all the elements you asked for.
@makarkotlov If you'd like to return the first element, try head.
Thank you!
Most helpful comment
@makarkotlov If you'd like to return the first element, try
head.