Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

60%
+1 −0
Challenges Lone ​​​​​​ones

Japt -x, 4 bytes Takes input as an array of binary digits. òÎl1 Try it òÎl1 :Implicit input of binary digit array ò :Partition between elements where Î : The sign of thei...

posted 6mo ago by Shaggy‭  ·  edited 6mo ago by Shaggy‭

Answer
#2: Post edited by user avatar Shaggy‭ · 2026-03-27T22:55:28Z (6 months ago)
  • # [Japt](https://github.com/ETHproductions/japt) [`-x`](https://codegolf.meta.stackexchange.com/a/14339/), 4 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • Takes input as an array of binary digits.
  • òÎl1
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LXg&header=7DI&code=8s5sMQ&input=MTQzMTY1NTc2NQ)
  • # [Japt](https://github.com/ETHproductions/japt) [`-x`](https://codegolf.meta.stackexchange.com/a/14339/), 4 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • Takes input as an array of binary digits.
  • òÎl1
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LXg&header=7DI&code=8s5sMQ&input=MTQzMTY1NTc2NQ)
  • òÎl1 :Implicit input of binary digit array
  • ò :Partition between elements where
  • Î : The sign of their difference is truthy (not 0)
  • l1 :Filter to elements of length 1
  • :Implicit output of sum of resulting array
#1: Initial revision by user avatar Shaggy‭ · 2026-03-26T20:40:10Z (6 months ago)
# [Japt](https://github.com/ETHproductions/japt) [`-x`](https://codegolf.meta.stackexchange.com/a/14339/), 4 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)

Takes input as an array of binary digits.

    òÎl1

[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LXg&header=7DI&code=8s5sMQ&input=MTQzMTY1NTc2NQ)