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

10
LINES

< > BotCompany Repo | #1002747 // isJuxta

JavaX fragment (include)

1  
// is it "* *" etc. (SNL juxtaposition), or "[]" (NL juxtaposition)?
2  
static boolean isJuxta(Lisp l) {
3  
  if (l == null) ret false;
4  
  if (l.is("[]")) ret true;
5  
  if (l(l.head) == 0) ret false;
6  
  for (int i = 0; i < l(l.head); i++)
7  
    if (l.head.charAt(i) != ((i & 1) == 0 ? '*' : ' '))
8  
      ret false;
9  
  ret true;
10  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002747
Snippet name: isJuxta
Eternal ID of this version: #1002747/1
Text MD5: d8c6f3b02c5e93638061520003b49e51
Author: stefan
Category: snl logic
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-03-03 02:10:18
Source code size: 324 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 753 / 864
Referenced in: [show references]