Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

FINALLY
Source Link
Erik the Outgolfer
  • 40.8k
  • 5
  • 46
  • 125

Jelly, 24 bytes

"Ṣẉ»ẇ8Ṇȧ®
ṫ-3;ƈ©Ȯ¤μ+Ç¿ṛ"

Try it online!

Explanation:

ṫ-3;ƈ©Ȯ¤μ+Ç¿ṛ" Main link. Arguments: 0
ṫ-3 Truncate the list to its 4 last elements.
 ;ƈ©Ȯ¤ Store a character from STDIN in the register, print it, and append it to the list (list is initially [0]).
 μ Start a new monadic chain, everything to the left is a link.
 Ç Execute the helper link with the existing list as its argument.
 + ¿ Do-while loop, left link is body, right link is condition.
 ṛ" When the loop ends, replace the return value with [] (invisible on output).
"Ṣẉ»ẇ8Ṇȧ® Helper link. Arguments: string
"Ṣẉ»ẉ8Ṇ Check if "hello" isn't in the string.
 ® Return the character we stored in the register.
 ȧ Check if both of the above are truthy.

Jelly, 24 bytes

"Ṣẉ»ẇ8Ṇȧ®
ṫ-3;ƈ©Ȯ¤μ+Ç¿ṛ"

Try it online!

Jelly, 24 bytes

"Ṣẉ»ẇ8Ṇȧ®
ṫ-3;ƈ©Ȯ¤μ+Ç¿ṛ"

Try it online!

Explanation:

ṫ-3;ƈ©Ȯ¤μ+Ç¿ṛ" Main link. Arguments: 0
ṫ-3 Truncate the list to its 4 last elements.
 ;ƈ©Ȯ¤ Store a character from STDIN in the register, print it, and append it to the list (list is initially [0]).
 μ Start a new monadic chain, everything to the left is a link.
 Ç Execute the helper link with the existing list as its argument.
 + ¿ Do-while loop, left link is body, right link is condition.
 ṛ" When the loop ends, replace the return value with [] (invisible on output).
"Ṣẉ»ẇ8Ṇȧ® Helper link. Arguments: string
"Ṣẉ»ẉ8Ṇ Check if "hello" isn't in the string.
 ® Return the character we stored in the register.
 ȧ Check if both of the above are truthy.
Post Undeleted by Erik the Outgolfer
added 46 characters in body
Source Link
Erik the Outgolfer
  • 40.8k
  • 5
  • 46
  • 125

Jelly, 2124 bytes

"Ṣẉ»ẇ8Ṇȧ®
;ƈ©Ȯ¤$+Ç¿ṛ"ṫ-3;ƈ©Ȯ¤μ+Ç¿ṛ"

Try it online!

Explanation:Try it online!

;ƈ©Ȯ¤$+Ç¿ṛ" Main link. Arguments: 0
;ƈ©Ȯ¤$ Store a character from STDIN in the register, print it, and append it to the list ([0, input chars...]).
 Ç Execute the helper link with the existing list as its argument.
 + ¿ Do-while loop, left link is body, right link is condition.
 ṛ" When the loop ends, replace the return value with [] (invisible on output).
"Ṣẉ»ẇ8Ṇȧ® Helper link. Arguments: string
"Ṣẉ»ẉ8Ṇ Check if "hello" isn't in the string.
 ® Return the character we stored in the register.
 ȧ Check if both of the above are truthy.

Jelly, 21 bytes

"Ṣẉ»ẇ8Ṇȧ®
;ƈ©Ȯ¤$+Ç¿ṛ"

Try it online!

Explanation:

;ƈ©Ȯ¤$+Ç¿ṛ" Main link. Arguments: 0
;ƈ©Ȯ¤$ Store a character from STDIN in the register, print it, and append it to the list ([0, input chars...]).
 Ç Execute the helper link with the existing list as its argument.
 + ¿ Do-while loop, left link is body, right link is condition.
 ṛ" When the loop ends, replace the return value with [] (invisible on output).
"Ṣẉ»ẇ8Ṇȧ® Helper link. Arguments: string
"Ṣẉ»ẉ8Ṇ Check if "hello" isn't in the string.
 ® Return the character we stored in the register.
 ȧ Check if both of the above are truthy.

Jelly, 24 bytes

"Ṣẉ»ẇ8Ṇȧ®
ṫ-3;ƈ©Ȯ¤μ+Ç¿ṛ"

Try it online!

Post Deleted by Erik the Outgolfer
added 651 characters in body
Source Link
Erik the Outgolfer
  • 40.8k
  • 5
  • 46
  • 125

Jelly, 21 bytes

"Ṣẉ»ẇ8Ṇȧ®
;ƈ©Ȯ¤$+Ç¿ṛ"

Try it online!

Explanation:

;ƈ©Ȯ¤$+Ç¿ṛ" Main link. Arguments: 0
;ƈ©Ȯ¤$ Store a character from STDIN in the register, print it, and append it to the list ([0, input chars...]).
 Ç Execute the helper link with the existing list as its argument.
 + ¿ Do-while loop, left link is body, right link is condition.
 ṛ" When the loop ends, replace the return value with [] (invisible on output).
"Ṣẉ»ẇ8Ṇȧ® Helper link. Arguments: string
"Ṣẉ»ẉ8Ṇ Check if "hello" isn't in the string.
 ® Return the character we stored in the register.
 ȧ Check if both of the above are truthy.

Jelly, 21 bytes

"Ṣẉ»ẇ8Ṇȧ®
;ƈ©Ȯ¤$+Ç¿ṛ"

Try it online!

Jelly, 21 bytes

"Ṣẉ»ẇ8Ṇȧ®
;ƈ©Ȯ¤$+Ç¿ṛ"

Try it online!

Explanation:

;ƈ©Ȯ¤$+Ç¿ṛ" Main link. Arguments: 0
;ƈ©Ȯ¤$ Store a character from STDIN in the register, print it, and append it to the list ([0, input chars...]).
 Ç Execute the helper link with the existing list as its argument.
 + ¿ Do-while loop, left link is body, right link is condition.
 ṛ" When the loop ends, replace the return value with [] (invisible on output).
"Ṣẉ»ẇ8Ṇȧ® Helper link. Arguments: string
"Ṣẉ»ẉ8Ṇ Check if "hello" isn't in the string.
 ® Return the character we stored in the register.
 ȧ Check if both of the above are truthy.
Source Link
Erik the Outgolfer
  • 40.8k
  • 5
  • 46
  • 125
Loading

AltStyle によって変換されたページ (->オリジナル) /