Functions ========= ```Example from 1 languages: JavaScript function helloWorld() {console.log("hi")} ``` ```Example from 1 languages: Java TODO ``` ```Example from 1 languages: Lua function myFunction() print("hello") end ``` ```Example from 1 languages: Pug mixin article(title) .article .article-wrapper h1= title if block block else p No content provided +article('Hello world') +article('Hello world') p This is my p Amazing article ``` ```Example from 1 languages: Chapel proc ``` ```Example from 1 languages: MoonBit fn main { } ``` ```Example from 1 languages: Lil on myFunction do print["hello"] end ``` ```Example from 1 languages: Cyber func fib(n int) int: coyield if n < 2: return n return fib(n - 1) + fib(n - 2) ``` ```Example from 1 languages: Jule fn a_function() { // ... } ``` ```Example from 1 languages: Cwerg fun main(argc s32, argv ^^u8) s32: -- initialized to false let! board = [DIM][DIM]bool{} let n = Solve(&!board, 0) fmt::print#(n, "\n") return 0 ``` ```Example from 1 languages: Speedie function Example (|string| data) file <~ data ``` ```Example from 1 languages: Bel (fn (x) (+ x 1)) ``` ```Example from 1 languages: plang - call !FooBar %name% ``` ```Example from 1 languages: BALGOL FUNCTION TORADS(DEGREES) = DEGREES . 3.1415926/180$ ``` * Languages *with* Functions include JavaScript, C, Python, Java, Ruby, PHP, R, PowerShell, Bash, Rust, Scala, Lua, Kotlin, Haskell, Erlang, Julia, Solidity, Ada, Crystal, Reason, Pug, Chapel, Groovy, OCaml, F#, VHDL, C3, F*, ABAP, Verilog, Koka, Janet, Opa, MoonBit, Lil, SystemVerilog, progsbase, X10, ATS, Cyber, Jule, IGOR Pro, Ligo, Cwerg, Eclipse Command Language, Sophia, Speedie, Bel, plang, Q#, BALGOL * Languages *without* Functions include CSS, mmCIF * View all concepts with or missing a *hasFunctions* measurement http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasFunctions&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22null%22%2C%22data%22%3A%22hasFunctions%22%2C%22origData%22%3A%22hasFunctions%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D missing http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasFunctions&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22!null%22%2C%22data%22%3A%22hasFunctions%22%2C%22origData%22%3A%22hasFunctions%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D with * Read more about Functions on the web: 1. https://en.wikipedia.org/wiki/Subroutine 1. Built with Scroll v178.2.3