Finding the length of a lisp-style list is a manual process. You have to traverse the list. As such, it most likely doesn't worth it in a smart contract context, so it's better to keep a separate counter variable, whenever you're going to need to use length.
Answered
How to measure the length of a Lisp-style list?
FunC standard library includes Lisp-style lists. TON documentation describes them and their basic functionality like adding an element to the beginning of a list, but there's no mention of measuring the length of a list. How to do it?
This question was imported from Telegram Chat: https://t.me/tondev/136138
13K Views
1
Answer
one year ago
one year ago
Tags