Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WiktionaryThe Free Dictionary
Search

Module:table/sortedPairs

From Wiktionary, the free dictionary
<Module:table

This module lacks adocumentation subpage. Pleasecreate it.
Useful links:root pageroot page’s subpageslinkstransclusionstestcasessandbox
localtable_keys_to_list_module="Module:table/keysToList"localfunctionkeys_to_list(...)keys_to_list=require(table_keys_to_list_module)returnkeys_to_list(...)end--[==[Iterates through a table, with the keys sorted using the keysToList function.If there are only numerical keys, `export.sparseIpairs` is probably faster.]==]returnfunction(t,key_sort)locallist,i=keys_to_list(t,key_sort),0returnfunction()i=i+1localk=list[i]ifk~=nilthenreturnk,t[k]endendend
Retrieved from "https://en.wiktionary.org/w/index.php?title=Module:table/sortedPairs&oldid=84631571"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp