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

10
LINES

< > BotCompany Repo | #1002747 // isJuxta

JavaX fragment (include)

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

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: 661 / 767
Referenced in: [show references]