Linked Questions

43
votes
6answers
6k views

Default for Code Golf: Program, Function or Snippet?

One of the things many (new?) users forget to specify in code-golf challenges is whether the answers should provide a full program or a function (or even just a snippet). For most such things, we have ...
29
votes
8answers
4k views

Standard definitions of terms within specifications

Quite often I find that I am repeating myself when creating a challenge. For example, usually I have to retype the definition of "random" in all of my posts, or I have to specify the same thing about ...
19
votes
5answers
740 views

Mass editing of syntax highlighting - good or bad?

I've noticed that this user is making a lot of edits lately, and all they do is add the <!--language: * --> syntax highlighting hint. Now, I'm not saying ...
18
votes
5answers
795 views

Things to consider when creating a challenge

There's a lot to remember to include when writing a challenge for this site. What are some things that are easy to forget? Return to FAQ index
13
votes
2answers
1k views

Unnamed Functions in Code Golf

For many code golf questions, we allow functions as answers. What exactly does it mean for some code to be a valid submission as a function? This question came up during a discussion on built-ins, ...
4
votes
2answers
986 views

Java function literals

In this meta post, it's decided that function literals are valid when a function is required. What about lambda expressions in Java 8? These are similar to function literals in other languages, but ...
4
votes
2answers
416 views

How do we calculate the length of lambda?

Example: Write a function which returns number passed into it as an argument. Solution: f=x=>x What is its length? Is it 4 as a length of the lambda ...
7
votes
1answer
248 views

If your answer is acts differently depending on context, how safe do you have to be?

This is kind of a follow-up to / re-asking of "Should point-free function expressions be allowed when a function is asked for?" with specific reference to the only language I know how to golf in, j, ...
5
votes
1answer
249 views

Should point-free function expressions be allowed when a function is asked for?

Should an expression evaluating to a function count as a function for the purpose of providing a solution when a function is asked for? An earlier question on meta seems to indicate a consensus that ...
11
votes
2answers
438 views

C# Lambdas as Answers to questions asking for a Function

Edit: I've broken the proposal out into an answer, but left the examples where they are. Please do not consider a vote for this question to constitute support for the proposal Apologies in advance, ...
5
votes
1answer
62 views

Are Defaults for Code Golf implicit?

Recently, I've made some major edits to a couple of challenges, and I sort of instinctively cited the appropriate defaults here on meta, like: Write a program or function to output the sum of ...
7
votes
0answers
238 views

Does code need to be 100% syntactically correct? [duplicate]

I've come across the following answer in a code-golf challenge in Haskell, where one has to provide a function: <bindings> <expression> Now, the last ...
8
votes
0answers
154 views

Why can't we take input from a variable? [duplicate]

On the default allowed I/O methods, we have come to a consensus that programs may not take input from a predefined variable. However, we have decided that anonymous functions are allowed. In the ...
0
votes
0answers
113 views

Is a function allowed? [duplicate]

Is it allowed to use a function instead of a complete program, in a code-golf question? (This has probably been asked before, I'm unable to locate the link.) Asked wrt @agtoever 's query on Output ...