goal

g()()()()('al') → "gooooal"

  • 所有者: eatnumber1/goal
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

g()('al')

g()('al') is a challenge whereby you need to write in as many languages as
possible code which enables the code g()('al') to return the string "goal",
the code g()()('al') to return the string "gooal", the code g()()()('al')
return the string "goooal", etc.

g()('al') is the creation of acruikshank who originally posed it as a
functional programming challenge. Extensive stubbornness
and misinterpretation led to its current form.

Rules

  1. You are encouraged to break the rules, cleverly.
  2. When executed, the solution must print "goal" with sufficient o's to
    demonstrate the program's functionality.
  3. The code g()('al') must appear in the source.
  4. g()('al') must not be a string literal.
  5. 'al' must be a string, or your language's equivalent thereof. You may
    use your language's standard method of creating a string (e.x. C should
    use ", ruby may use either " or ').
  6. g()('al') must be a valid rvalue if applicable in your language.
  7. g()('al') may not print the string. If returning a string cannot be done
    in your language, you should submit rationale as to why this is impossible
    for a solution which prints a string to be accepted.
  8. You must be able to insert an arbitrary number of () calls without
    modification to your solution. Therefore solutions like
    this are incorrect.
  9. g('al') must return "gal".

If you see a complete solution that breaks any of these rules, file a bug!

If you have a solution that is close, but does not meet these rules, submit it
anyway. A close and interesting solution is better than no solution.

Previous Solutions

The more exciting solutions are original, not applying techniques that have
already been discovered. The following broadly applicable techniques have
already been discovered:

Languages, Solved, Incomplete, :-------------:, :----------------------:, :---------------------:, ActionScript, , Befunge, , Brainfuck, , C, , C#, , C++, , Clojure, , Coffeescript, , Common Lisp, , D, , Dart, , DYLD, , Emacs Lisp, , English, , Finite State Transducer, , Forth, , GNU Octave, , Go, , Groovy, , Haskell, , Haxe, , IO, , Java, , JavaScript, , Julia, , Lua, , Mathematica, , Nimrod, , OCaml, , Objective-J, , PHP, , PHP 7, , Perl, , Perl 6, , Python, , R, , Regexp, , Ruby, , Scala, , Scheme, , Sed, , Bourne Shell, , TCL, , XP, , ZSH, , Help out, add some more languages!

g()('lf')

Lets play golf! Submit a pull-request with a shorter solution for an already
solved language and you can get the title of shortest, as shown in that
language's README.

Note: I'm not done making READMEs for all the languages yet. Don't let that stop
you!

These are some of the editor's favorite submissions:

主要指标

概览
名称与所有者eatnumber1/goal
主编程语言C
编程语言C (语言数: 47)
平台
许可证
所有者活动
创建于2014-07-25 20:00:23
推送于2022-12-21 22:49:14
最后一次提交2022-12-21 14:49:14
发布数0
用户参与
星数341
关注者数16
派生数170
提交数613
已启用问题?
问题数16
打开的问题数0
拉请求数174
打开的拉请求数0
关闭的拉请求数24
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?