Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1025468 // Seen or not [dev.]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (101L/1K).

1  
!7
2  
3  
/* We want an algebraic data type:
4  
5  
  SeenOrNot =
6  
      Seen(rect, furtherNotes)
7  
    | NotSeen
8  
*/
9  
10  
// We simulate that with records and an interface:
11  
12  
sinterface SeenOrNot {}
13  
srecord Seen(rect, furtherNotes) implements SeenOrNot {}
14  
srecord NotSeen implements SeenOrNot {}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025468
Snippet name: Seen or not [dev.]
Eternal ID of this version: #1025468/1
Text MD5: 47f4e5efb1a78ccce53cec15897d2eb5
Transpilation MD5: f2dc4c92c6e29a68cbe1b1ef7331bc81
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-29 15:39:55
Source code size: 288 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 157 / 602
Referenced in: [show references]