GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - egison/egison-tutorial: The Egison tutorial

BranchesTags
Open more actions menu

Latest commit

 

History

157 Commits
157 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Main.hs
Main.hs
 
 
README.md
README.md
 
 
egison-tutorial.cabal
egison-tutorial.cabal
 
 

Repository files navigation

The Egison Tutorial

This is a repository for a tutorial program of Egison. Egison is a pattern-matching-oriented, purely functional programming langauge. Using Egison, we can represent intuitive patterns for non-free data types such as multisets, sets, graphs, and mathematical expressions.

For more information, please visit Egison website.

How to compile and run

% cabal install
% egison-tutorial
Egison Tutorial Version 4.0.0
Welcome to Egison Tutorial!
** Information **
We can use a "Tab" key to complete keywords on the interpreter.
If we type a "Tab" key after a closed parenthesis, the next closed parenthesis will be completed.
*****************
==============================
List of sections in the tutorial.
1: Arithmetic
2: Basics of functional programming
3: Basics of pattern matching
4: Pattern matching for multisets and sets
5: Symbolic computation
6: Differential geometry: tensor analysis
7: Differential geometry: differential forms
==============================
Choose a section to learn.
(1-7): 4
====================
We can describe pattern matching for multisets and sets.
We can change the interpretation of patterns by changing the matcher, the second argument of the matchAll expression).
The meaning of the cons pattern (::) is generalized to divide a collection into "an" element and the rest.

Examples:
  matchAll [1, 2, 3] as list integer with $x :: $xs -> (x, xs)
  matchAll [1, 2, 3] as multiset integer with $x :: $xs -> (x, xs)
  matchAll [1, 2, 3] as set integer with $x :: $xs -> (x, xs)
====================
> matchAll [1, 2, 3] as list integer with $x :: $xs -> (x, xs)
[(1, [2, 3])]

About

The Egison tutorial

Resources

Readme
MIT license
Activity
Custom properties

Stars

15 stars

Watchers

2 watching

Forks

6 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.