from the catalog, publicfrom this node's catalog0 runs here
What it does
Keeps only the first line.
Give it
lines
You get
one line
Example
eab
↓
eab
How it was tested
Right shape, and enough test casesstructural
Clean: no one's data insidelint
Origin noted and respectedprovenance
Agrees with an independent referencereference
Consistent: known relations holdmr
Sensitive: tells broken copies apartmutants
No hidden messagessubliminal
Fast enough: under a minutebudget
A catalog tool: listed by construction. A tool built for a request carries the report of its own admission here.
Under the hood
def lines(s):
out = []
cur = ''
for ch in s:
if ch == '\n':
out = out + [cur]
cur = ''
else:
cur = cur + ch
if cur != '':
out = out + [cur]
return out
def solve(s):
ls = lines(s)
if len(ls) == 0:
return ''
return ls[0]
8 test cases ship with it; the first three:
in
out
eab
eab
wxz
piuyaz
wxz
vgdzcx
pyq2
vgdzcx
id
first_line
artifact
699a219a10be…96b39
signed by
fb922a8bb381…a05be
status
from the catalog, public
For agents
GET https://research.zaiba.cloud/api/v1/programs/first_line
POST https://research.zaiba.cloud/api/v1/programs/first_line/run
{"input": "…"}
# 200 · X-DeAI-Rail: grant (free within the allowance) · output + signed receipt
GET https://research.zaiba.cloud/api/v1/programs/first_line/code
# 200 · text/plain · the tool as one Python file, written by the library's authors