NestList
詳細
- NestList[f,expr,n]は,長さ n+1のリストを与える.
例題
すべて開く すべて閉じる例 (3)
f を x に0回から4回適用することで,リストを作成する:
NestList[f, x, 4]Cosを数に繰り返し適用する:
NestList[Cos, 1.0, 10]NestList[(1 + #) ^ 2&, x, 3]スコープ (4)
NestList[(1 + #) ^ 2&, x, 3]NestList[Sqrt, 100.0, 4]With[{ϵ = 0.1}, NestList[Function[xy, {2ϵ, 0} + {{1 - 2ϵ, 0}, {0, 1 - 2ϵ}}.xy], {1.0, 1.0}, 4]]op = NestList[Sin, 4];op[0.]op[(π/4.)]op[(π/2.)]一般化と拡張 (1)
アプリケーション (15)
NestList[2#1&, 1, 10]NestList[# + 1&, 0, 10]NestList[# ^ 2&, 2, 6]NestList[#(1 + 0.05)&, 1000, 10]NestList[D[#, x]&, x ^ n, 3]NestList[(# + 2 / #) / 2&, 1.0, 5]NestList[1 / (1 + #)&, x, 5]NestList[4#(1 - #)&, 1 / 3, 5]NestList[4#(1 - #)&, N[1 / 3], 10]NestList[If[EvenQ[#], # / 2, (3# + 1) / 2]&, 100, 20]NestList[Mod[59#, 101]&, 1, 15]NestList[# + RandomChoice[{-1, 1}]&, 0, 20]ListLinePlot[%]NestList[StringReplace[#, {"A" -> "BA", "B" -> "AB"}]&, "A", 5]NestList[Append[#, x]&, {a}, 5]NestList[RotateLeft, {a, b, c, d}, 4]NestList[{f[Last[#]], g[First[#]]}&, {x, y}, 5]特性と関係 (5)
NestList[f, x, 4]Nest[f, x, 4]NestList[f, x, 0]FixedPointListは結果が変化しなくなるまで続行される:
NestList[1 + Floor[# / 2]&, 1000, 15]FixedPointList[1 + Floor[# / 2]&, 1000, 15]NestWhileListは条件が真である間は続行される:
NestWhileList[If[EvenQ[#], # / 2, (3# + 1) / 2]&, 29, # > 1&]FoldListは2番目の引数をリストから自動的に挿入する:
NestList[f[#, a]&, x, 3]FoldList[f, x, {a, a, a}]おもしろい例題 (4)
NestList[Framed, x, 6]NestList[Style[#, Larger]&, x, 6]NestList[x ^ #&, x, 6]NestList[# ^ #&, x, 4]NestList[Framed[Row[{#, #}]]&, x, 4]NestList[p[#][#]&, x, 3]NestList[Subsuperscript[#, #, #]&, x, 4]テクニカルノート
関連するガイド
-
▪
- 関数反復 ▪
- リストの構築 ▪
- 関数型プログラミング ▪
- 計算系 ▪
- 反復写像とフラクタル ▪
- 言語の概要 ▪
- 科学的モデル ▪
- リスト操作
関連リンク
-

An Elementary Introduction to the Wolfram Language
: Applying Functions Repeatedly
-

An Elementary Introduction to the Wolfram Language
: More about Pure Functions
-

An Elementary Introduction to the Wolfram Language
: Rearranging Lists
-

An Elementary Introduction to the Wolfram Language
: More about Patterns
-

An Elementary Introduction to the Wolfram Language
: String Patterns and Templates
-

NKS|Online
(A New Kind of Science)
履歴
1988 で導入 (1.0) | 2024 で更新 (14.1)
テキスト
Wolfram Research (1988), NestList, Wolfram言語関数, https://reference.wolfram.com/language/ref/NestList.html (2024年に更新).
CMS
Wolfram Language. 1988. "NestList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/NestList.html.
APA
Wolfram Language. (1988). NestList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NestList.html
BibTeX
@misc{reference.wolfram_2026_nestlist, author="Wolfram Research", title="{NestList}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/NestList.html}", note=[Accessed: 03-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_nestlist, organization={Wolfram Research}, title={NestList}, year={2024}, url={https://reference.wolfram.com/language/ref/NestList.html}, note=[Accessed: 03-November-2026]}