Skip to content

Commit

Permalink
minor overview change
Browse files Browse the repository at this point in the history
  • Loading branch information
mcsoto committed Jul 23, 2014
1 parent 337e727 commit 89fbcfd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Cosmos
Cosmos is a modern logic programming language.

> **Note:** the language is in alpha.
> **Note:** the language is in very early alpha.
Download
---
Expand Down Expand Up @@ -80,7 +80,7 @@ rel main()
x = double(4) //x is 8
```

Note how conventional the code looks now. Despite being a declarative language, Cosmos can look and behave very similarly to a typical language at times. How similar is up to the programmer.
Although it is a logic programming language, code in this language can look and behave very conventionally: the above code might seem imperative or functional.

Whereas functions have one output, relations may have zero, one or more outputs. You can check this by making queries at the interpreter.

Expand Down Expand Up @@ -206,7 +206,7 @@ Code such as
is simply sugar for

```
s = 'a' or (s = 'b' and x = 1) or x = 2
(s = 'a' and x = 0) or (s = 'b' and x = 1) or x = 2
```

Whitespace
Expand Down
4 changes: 4 additions & 0 deletions src/.temp.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:- style_check([-singleton,-no_effect]), ensure_loaded("core.pl").
temp_env(X) :- new(X0),set(X0,"y2",temp_y2,X1),set(X1,"y",temp_y,X2),set(X2,"p",temp_p,X3),set(X3,"main",temp_main,X4),list_env(Y4),set(X4,"list",Y4,X5),string_env(Y5),set(X5,"string",Y5,X6),math_env(Y6),set(X6,"math",Y6,X7),io_env(Y7),set(X7,"io",Y7,X8),logic_env(Y8),set(X8,"logic",Y8,X9),set(X9,"Some",temp_Some,X10),set(X10,"None",temp_None,X11),set(X11,"Left",temp_Left,X12),set(X12,"Right",temp_Right,X13),X=X13.
temp0(Env0,_x) :- eq(_x,1);eq(_x,2).
temp(_y2, _y, _p) :- temp_env(Env0),(eq(_p,closure(temp0,Env0)),(closure_call(Env0,_p,[_y]),closure_call(Env0,_p,[_y2]))).

0 comments on commit 89fbcfd

Please sign in to comment.