Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

Lazy

Guides

  • Guide
  • MainGuide

Symbols

  • LazyDirectoryTree
  • LazyExpression
  • LazyLength
  • LazyList
  • Lazy
  • LazySplits
  • LazyTraverse
  • LazyTreeEdges
  • LazyTree
  • LazyValueArray
  • LazyValue
  • MultiwayNest
Wolfram`Lazy`
MultiwayNest
​
MultiwayNest[f,x]
XXXX
​
Examples  
(1)
Basic Examples  
(1)
In[1]:=
GraphNormal@LazyTake[20]@
MultiwayNest
[{#+1,2#}&,1,"BreadthFirst"],VertexLabelsAutomatic
Out[1]=
In[2]:=
GraphNormal@LazyTake[20]@
MultiwayNest
[{#+1,2#}&,1,"DepthFirst"],VertexLabelsAutomatic
Out[2]=
In[3]:=
MultiwayNest
[{2#,3#}&,1,"NestedList"]
Out[3]=
LazyList
{LazyList
{12
}

}

In[4]:=
Block{$RecursionLimit=50},
MultiwayNest
[{2#,3#}&,1,"NestedList"]//Normal//Flatten//Graph
Out[4]=
Contents cannot be rendered at this time; please try again later
Breadth-first vs Depth-first:
In[5]:=
Row@ListAnimateGraph[#,VertexLabelsAutomatic,GraphLayout"LayeredDigraphEmbedding"]&/@Reverse@NestWhileListRest,Reverse@Normal@
MultiwayNest
[If[#<40,{2#,3#},{}]&,2,"BreadthFirst"],​​Length[#]>0&​​,1,​​ListAnimateGraph[#,VertexLabelsAutomatic,GraphLayout"LayeredDigraphEmbedding"]&/@Reverse@NestWhileListRest,Reverse@Normal@
MultiwayNest
[If[#<40,{2#,3#},{}]&,2,"DepthFirst"],​​Length[#]>0&​​,1​​
Out[5]=
Contents cannot be rendered at this time; please try again later
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com