99 < title > Cognate: Readable and concise concatenative programming</ title >
1010 < link rel ="preconnect " href ="https://fonts.googleapis.com ">
1111 < link rel ="preconnect " href ="https://fonts.gstatic.com " crossorigin >
12- < link href ="https://fonts.googleapis.com/css2?family=Space +Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap " rel ="stylesheet ">
12+ < link href ="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Ubuntu +Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap " rel ="stylesheet ">
1313 </ head >
1414 < body >
1515
@@ -19,13 +19,15 @@ <h1 id="cognate">Cognate</h1>
1919< h2 id ="readable-and-concise-concatenative-programming "> Readable and concise concatenative programming</ h2 >
2020< div class ="code "> < pre > < code > < span style ='font-style: italic;color: #969896 '> ~~ Fizzbuzz in Cognate</ span >
2121
22- < span style ='color: #0086b3 '> Def</ span > < span style ='color: #795da3 '> Multiple</ span > < span style ='color: #333333 '> as</ span > < span style ='color: #4e4e4e '> (</ span > < span style ='color: #183691 '> Zero?</ span > < span style ='color: #183691 '> Modulo</ span > < span style ='color: #4e4e4e '> )</ span > ;
23-
24- < span style ='color: #0086b3 '> Def</ span > < span style ='color: #795da3 '> Fizzbuzz</ span >
25- < span style ='color: #a71d5d '> Case</ span > < span style ='color: #4e4e4e '> (</ span > < span style ='color: #795da3 '> Multiple</ span > < span style ='color: #333333 '> of</ span > < span style ='color: #0086b3 '> 15</ span > < span style ='color: #4e4e4e '> )</ span > < span style ='color: #333333 '> is</ span > < span style ='color: #183691 '> "fizzbuzz"</ span >
26- < span style ='color: #a71d5d '> Case</ span > < span style ='color: #4e4e4e '> (</ span > < span style ='color: #795da3 '> Multiple</ span > < span style ='color: #333333 '> of</ span > < span style ='color: #0086b3 '> 3</ span > < span style ='color: #4e4e4e '> )</ span > < span style ='color: #333333 '> is</ span > < span style ='color: #183691 '> "fizz"</ span >
27- < span style ='color: #a71d5d '> Case</ span > < span style ='color: #4e4e4e '> (</ span > < span style ='color: #795da3 '> Multiple</ span > < span style ='color: #333333 '> of</ span > < span style ='color: #0086b3 '> 5</ span > < span style ='color: #4e4e4e '> )</ span > < span style ='color: #333333 '> is</ span > < span style ='color: #183691 '> "buzz"</ span >
28- < span style ='color: #333333 '> otherwise</ span > < span style ='color: #4e4e4e '> (</ span > < span style ='color: #4e4e4e '> )</ span > ;
22+ < span style ='color: #0086b3 '> Def</ span > < span style ='color: #795da3 '> Fizzbuzz</ span > < span style ='color: #4e4e4e '> (</ span >
23+ < span style ='color: #0086b3 '> Let</ span > < span style ='color: #795da3 '> N</ span > < span style ='color: #333333 '> be</ span > < span style ='color: #183691 '> Of</ span > < span style ='color: #4e4e4e '> (</ span > < span style ='color: #183691 '> Integer?</ span > < span style ='color: #4e4e4e '> )</ span > ;
24+ < span style ='color: #0086b3 '> Def</ span > < span style ='color: #795da3 '> Multiple</ span > < span style ='color: #333333 '> as</ span > < span style ='color: #4e4e4e '> (</ span > < span style ='color: #183691 '> Zero?</ span > < span style ='color: #183691 '> Modulo</ span > < span style ='color: #183691 '> Swap</ span > < span style ='color: #795da3 '> N</ span > < span style ='color: #4e4e4e '> )</ span > ;
25+ < span style ='color: #183691 '> Print</ span >
26+ < span style ='color: #a71d5d '> If</ span > < span style ='color: #795da3 '> Multiple</ span > < span style ='color: #333333 '> of</ span > < span style ='color: #0086b3 '> 15</ span > < span style ='color: #333333 '> then</ span > < span style ='color: #183691 '> "fizzbuzz"</ span >
27+ < span style ='color: #a71d5d '> If</ span > < span style ='color: #795da3 '> Multiple</ span > < span style ='color: #333333 '> of</ span > < span style ='color: #0086b3 '> 3</ span > < span style ='color: #333333 '> then</ span > < span style ='color: #183691 '> "fizz"</ span >
28+ < span style ='color: #a71d5d '> If</ span > < span style ='color: #795da3 '> Multiple</ span > < span style ='color: #333333 '> of</ span > < span style ='color: #0086b3 '> 5</ span > < span style ='color: #333333 '> then</ span > < span style ='color: #183691 '> "buzz"</ span >
29+ < span style ='color: #333333 '> else</ span > < span style ='color: #795da3 '> N</ span >
30+ < span style ='color: #4e4e4e '> )</ span > ;
2931
3032< span style ='color: #a71d5d '> For</ span > < span style ='color: #333333 '> each</ span > < span style ='color: #333333 '> in</ span > < span style ='color: #183691 '> Range</ span > < span style ='color: #0086b3 '> 1</ span > < span style ='color: #333333 '> to</ span > < span style ='color: #0086b3 '> 100</ span > < span style ='color: #4e4e4e '> (</ span > < span style ='color: #183691 '> Print</ span > < span style ='color: #795da3 '> Fizzbuzz</ span > < span style ='color: #4e4e4e '> )</ span >
3133</ code > </ pre > </ div > < p > Cognate is a project aiming to create a human readable programming language with as little syntax as possible. Where natural language programming usually uses many complex syntax rules, instead Cognate takes them away. What it adds is simple, a way to embed comments into statements.</ p >
0 commit comments