User Resources
› What is Dylan? › Learning Dylan › Downloads › Documentation › Community › Dylan Competes › Supported Platforms › Projects Using Dylan › Screenshots › Current Limitations › Our Goals
Developer Resources
› Repository Access › Browse Repository › Bug Tracker › CVSZilla Search › Current Projects › Dev Tools › Submit News

[ All Fragments ]

Everything's a Value

Every Dylan statement or expression returns a value. Control constructs and functions return the value of the last expression in their body.

define function absolute-value(x :: <integer>)
 => (result :: <integer>)
  if (x >= 0)
    x;
  else
    -x;
  end;
end;

Several other aspects of Dylan are visible in this example: