-
Notifications
You must be signed in to change notification settings - Fork 24
1.1 Creating content
Note: This only applies to offline usage.
Click on any code to begin editing it, then press Ctrl+Enter to execute the code.
Use the ➕︎ button to insert a new code cell. You can switch a cell contain explanations, comments, etc. by selecting Markdown from the drop-down saying Code∨. Additional commands can be found by clicking the ⌨︎ button.
Single-line dfns and tacit functions may be defined among other code in a code cell:
AddNext←{⍵,+/¯2↑⍵}
Fibonacci←AddNext/⌽∘⍳
Fibonacci 10
Tradfns may be defined in a cell by beginning the first line with a ∇ and having a sole ∇ after the last line:
∇Greet name
⎕←'Hello, ',name
∇
To define a multi-line dfn, begin a Code cell with the line ]dinput. For example:
]dinput
root←{
⍺←2
⍵*÷⍺
}
You can indicate that the result of a statement should be rendered as HTML by using the ]html user command:
p←'<p>Please:</p>'
b←'<button onclick="alert(''Thank you!'')">Click</button>'
]html p,b
You can plot data with with the ]plot user command:
x←(⍳100)÷20
y←(⊢*÷)x
]plot y x
Choose chart type with the -type= modifier:
]plot 3 1 4 1 6 -type=pie
Quick links: Dyalog APL Anaconda Kernel Ready-made notebooks Viewer Email us