-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import ../code/conceptPage.scroll | ||
|
||
id cognate | ||
name Cognate | ||
appeared 2020 | ||
creators Finn Barber | ||
tags pl | ||
description A human readable quasi-concatenative programming language | ||
paper https://cognate-lang.github.io/learn.html | ||
|
||
compliesTo C | ||
githubRepo https://github.com/cognate-lang/cognate | ||
|
||
conceptDescription Cognate is a small, dynamic, concatenative language for functional programming. Cognate aims to express complex programs in a simple and readable way through its unique syntax, which emphasises embedding comments into statements. This makes programs very readable and helps a programmer better express their intentions. | ||
|
||
website https://cognate-lang.github.io/ | ||
|
||
example | ||
~~ Prime numbers in Cognate | ||
|
||
Def Factor (Zero? Modulo Swap); | ||
|
||
Def Primes ( | ||
Let U is upper bound; | ||
initially List (); | ||
For Range 2 to U ( | ||
Let P is potential prime; | ||
Let Found be list of found primes; | ||
Let To-check be Take-while (<= Sqrt P) Found; | ||
When All (Not Factor of P) To-check ( | ||
Append P | ||
) to Found | ||
) | ||
); | ||
|
||
Print Primes up to 1000; |