text:
Product over a range
Your task is simple: given two integers \$a\$ and \$b\$, output \$\Pi[a,b]\$; that is, the product of the range between \$a\$ and \$b\$. You may take \$a\$ and \$b\$ in any reasonable format, whether that be arguments to a function, a list input, STDIN, et cetera. You may output in any reasonable format, such as a return value (for functions) or STDOUT. \$a\$ will always be less than \$b\$.
Note that the end may be exclusive or inclusive of \$b\$. I'm not picky. ^_^
Test cases
[a,b) => result
[2,5) => 24
[5,10) => 15120
[-4,3) => 0
[0,3) => 0
[-4,0) => 24

[a,b] => result
[2,5] => 120
[5,10] => 151200
[-4,3] => 0
[0,3] => 0
[-4,-1] => 24

This is a code-golf, so the shortest program in bytes wins.

Leaderboard
The Stack Snippet at the bottom of this post generates the catalog from the answers a) as a list of shortest solution per language and b) as an overall leaderboard.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
## Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:
## Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:
## Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the snippet:
## [><>](http://esolangs.org/wiki/Fish), 121 bytes

var QUESTION_ID=66202,OVERRIDE_USER=44713;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

I'm answering this in TI-BASIC tomorrow.

@SuperJedi224 Good luck ;)

Can the input be taken as b, a?

@FlipTack yes you can

Jelly, 2 bytes
rP

Takes two numbers as command line arguments. Try it online.
Note that this is inclusive range. For the cost of a byte (3 bytes), we can make this exclusive:
’rP

Try it online. Note that the arguments must be given in the order b a for this version.
Explanation
Inclusive
a rP b
  r   dyadic atom, creates inclusive range between a and b
   P  computes product of the list

Exclusive
b ’rP a
  ’   decrement b (by default, monadic atoms in dyadic chains operate on the left argument)
   r  range
    P product

I doubt this is beatable...

@kirbyfan64sos you jelly?

ArnoldC, 522 511 bytes
First post on codegolf !
I had fun doing this.
Exclusive range.
LISTEN TO ME VERY CAREFULLY f
I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE a
I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE b
GIVE THESE PEOPLE AIR
HEY CHRISTMAS TREE r
YOU SET US UP 1
HEY CHRISTMAS TREE l
YOU SET US UP 1
STICK AROUND l
GET TO THE CHOPPER r
HERE IS MY INVITATION r
YOU'RE FIRED a
ENOUGH TALK
GET TO THE CHOPPER a
HERE IS MY INVITATION a
GET UP 1
ENOUGH TALK
GET TO THE CHOPPER l
HERE IS MY INVITATION b
LET OFF SOME STEAM BENNET a
ENOUGH TALK
CHILL
I'LL BE BACK r
HASTA LA VISTA, BABY

Explanations (Thanks Bijan):
DeclareMethod f
        MethodArguments a
        MethodArguments b
        NonVoidMethod
        DeclareInt r
        SetInitialValue 1
        DeclareInt l
        SetInitialValue 1
        WHILE l
                AssignVariable r
                        SetValue r
                        MultiplicationOperator a
                EndAssignVariable
                AssignVariable a
                        SetValue a
                        + 1
                EndAssignVariable
                AssignVariable l
                        SetValue b
                        > a
                EndAssignVariable
        EndWhile
        Return r
EndMethodDeclaration

Hahaha... I am stil laughing

but an explanation would be great

Here it is converted and indented using this as reference

Which interpreter are you using?

The official one. You're right about @NO PROBLEMO and 1 (not 0 ;) )

the wierdest language i ever came across honestly !

This isn't weird, this is Arnold ! Take a look at the official page or the wiki if you like it

Get up. Enough talk. Get to the chopper.

Python, 30 bytes
f=lambda a,b:a>b or a*f(a+1,b)

Inclusive range. Repeatedly multiplies by and increments the left endpoint, until it is higher than the right endpoint, in which case it's the empty product of 1 (as True).

Minecraft 15w35a+, program size 456 total (see below)

This calculates PI [a,b). Input is given by using these two commands: /scoreboard players set A A {num} and /scoreboard players set B A {num}. Remember to use /scoreboard objectives add A dummy before input.
Scored using: {program size} + ( 2 * {input command} ) + {scoreboard command} = 356 + ( 2 * 33 ) + 34 = 456.
This code corresponds to the following psuedocode:
R = 1
loop:
  R *= A
  A += 1
  if A == B:
    print R
    end program

Download the world here.

Program size is counted by this scoring method.

Dammit, you got to it before I did. :I

You need to specify snapshot version, i.e. 15w46a or something.

Minecraft :D LoL, golfing in Minecraft :D

@username.ak This may surprise you, but it's not that uncommon here. Lol

TI-BASIC, 9 bytes
Input A
prod(randIntNoRep(A,Ans

Takes one number from Ans  and another from a prompt.
Also 9 bytes, taking input as a list from Ans:
prod(randIntNoRep(min(Ans),max(Ans

It took me a while to figure out for myself, so I'm gonna post it here: Each function in TI-BASIC is one byte.

@QPaysTaxes Lots of them do, but not all of them. % is two bytes.

Python 2, 44 38 bytes
lambda l:reduce(int.__mul__,range(*l))

Pretty much the obvious anonymous function answer.
EDIT: Thanks to xnor for saving 6 bytes with some features I didn't know.

You can use the built-in int.__mul__, which works in place of your lambda. The two numbers x,y can also be written unpacked as *l.

Crossed out 44 still looks like 44.

Pyth, 5 bytes
*FrQE

Pyth doesn't have product, so we reduce * over the range.
Uses exclusive range.

*FrFQ is equivalent but with different input, just for fun :)

Q is implicitly read, so this can become *FrF - 4 bytes

@Scott This question and answer were written long before Pyth had implicit input, so I'm keeping it.

R, 22 bytes
function(a,b)prod(a:b)

Mathematica, 15 bytes
1##&@@Range@##&

A shorter solution that only works for non-negative integers:
#2!/(#-1)!&

Even shorter for non-negative integers: #2!#/#!&

JavaScript (ES6), 34 bytes
(a,b)=>eval("for(c=a;aa<b?a*f(a+1,b):1

Japt, 7 bytes
Easy challenges like this are always fun. :)
UoV r*1

Try it online!
Explanation
UoV r*1  // Implicit: U = first input, V = second input
UoV      // Generate range [U,V).
    r*1  // Reduce by multiplication, starting at 1.

Wow, this seems pathetic compared to the other answers so far. I need to work on Japt some more...

Explanation? :3

@CᴏɴᴏʀO'Bʀɪᴇɴ Done :)

Woot, 5K rep! :D

looks like you got it to 5 bytes: oV r* Try It Online

Seriously, 4 bytes
,ixπ

,         Read list [a,b] from stdin
 i        Flatten it to a b
  x       Pop a,b, push range(a,b)
   π      Pop the list and push its product.

Hex Dump:
2c6978e3

Try it online

CJam, 6 19 18  10 bytes
Thanks to Dennis and RetoKoradi for help with golfing!
q~1$-,f+:*

Try it online
Takes input as a b. Calculates PI [a,b).
Note: this program is 6 bytes long, and only works if a and b are positive.
q~,>:*

Try it online
Takes input as a b. Calculates PI [a,b).

q~{_)_W$<}g;]:* saves three bytes.

q~1$-,f+:* for 10 bytes.

Prolog, 45 bytes
Code:
p(A,B,C):-A=B,C=A;D is A+1,p(D,B,E),C is A*E.

Explained:
p(A,B,C):-A=B,      % A is unifiable with B
          C=A       % Unify C with A
          ;         % OR
          D is A+1, % D is the next number in the range
          p(D,B,E), % Recurse on the range after the first element
          C is A*E. % The result C is the product of the first element and the result
                      of the recursion

Example:
p(5,10,X).
X = 151200

p(-4,-1,X).
X = 24

Octave, 15 bytes
@(a,b)prod(a:b)

Straightforward. Uses the inclusive range.

Haskell, 19 17 bytes
a#b=product[a..b]

Usage example: 2#5-> 120.

You're allowed to choose to include b.

@xnor: Ups, must have overlooked that. Thanks!

I'm not sure, but I think PPCG allows answers given as expressions.

@proudhaskeller: the default is to allow full programs and functions. Snippets, expressions, etc. have to be explicitly permitted in the task description.

Julia, 16 bytes
f(a,b)=prod(a:b)

Note: if the range object a:b (which is literally stored as a start value and a stop value, and internally includes a "increment by 1 on each step" value) is permitted as the input, then just 4 bytes are required: prod.

Bash + GNU utilities, 13
seq -s* $@|bc

Assumes there are no files in the current directory whose names start with -s.  Start and end (inclusive) are passed as command-line parameters.
This simply produces the sequence from start to end, separated by *, then pipes to bc for arithmetic evaluation.

But I start all my files with -s! :P

C, 32 bytes
For [a,b):
f(a,b){return a-b?a*f(a+1,b):1;}

For [a,b] (On Katenkyo's suggestions, 32 bytes again) :
f(a,b){return a<b?a*f(a+1,b):b;}

I found an other solution in C, if you're interested, it's also 32 bytes f(a,b){return ab?:a*f(a+1,b) as the body

MATL, 4 bytes
Inclusive Range
2$:p

Try it online!
Explanation
2$: % Implicitly grab two input arguments and create the array input1:input2
p   % Take the product of all array elements

Thanks to @Don Muesli for helping me get the hang of this whole MATL thing.

Isn't &:p a byte shorter?

@DrGreenEggsandIronMan at the time I posted my answer we didn't have &

JavaScript (ES6), 22 bytes
I can't believe none of us JS golfers thought to use recursion...
a=>F=b=>a-b?b*F(b-1):a

Assign to a variable with e.g. var q = a=>F=b=>a-b?b*F(b-1):a, then call like q(2)(5).

Brachylog, 3 bytes
⟦₃×

Try it online!
Input is passed as [A,B]. The range is exclusive of B, but could be made inclusive by replacing the ₃ with ₂.

Welcome to PPCG! Nowadays, it doesn't matter when languages are made, so this answer is perfectly competitive. Hope you enjoy your stay!

Ah, good to know! I guess I've been looking at too many old challenges with answers sorted by votes.

@UnrelatedString By the way, if you see those non-competing messages it's perfectly fine to edit them out.

Jolf, 4 bytes
Try it here!
OrjJ
  jJ two inputs
 r   range between them [j,J)
O    product

In modern Jolf, this can be Orj (which automatically is transpiled to Orjx)

Ruby, 22 bytes
->i,n{(i..n).reduce:*}

Ungolfed:
-> i,n {
  (i..n).reduce:* # Product of a range
}

Usage:
->i,n{(i..n).reduce:*}[5,10]
=> 151200

I was thinking about this same solution last night but didn't have the time to write it up.

A byte is saved with the introduction of implicit named parameters ->{(_1.._2).reduce:*}.

PowerShell, 30 Bytes
param($a,$b)$a..$b-join'*'|iex

Takes input as two integers, creates a range with .., then -joins that with asterisks, pipes it into Invoke-Expression (similar to eval). The range operator in PowerShell is inclusive.
Pretty competitive with non-golfing languages.

05AB1E, 2 bytes
Code:
ŸP

Explanation:
Ÿ   # Inclusive range [input, ..., input]
 P  # Total product of the list
    # Implicit printing top of the stack

J, 8 bytes
[:%/!@<:

Usage
>> f =: [:%/!@<:
>> f 10 5
<< 15120

where >> is STDIN and << is STDOUT.
Explanation
It computes ∏[a,b] as (b-1)!/(a-1)!.
minus_one =: <:
factorial =: !
of        =: @
monadic   =: [:
division  =: %/
f =: monadic division factorial of minus_one

Previous 13-byte version
Written when I had no idea what J even is :p
*/(}.[:>:i.)/

Usage:
   */(}.[:>:i.)/ 5 10
30240

Explanation:
*/            NB. multiply over
  (
   }.         NB. remove [the first x items] from
     [:>:     NB. increment all of
         i.   NB. the numbers from 0 to [y-1]
           )
            / NB. insert the above code into the following numbers

Detailed explanation:
i.10 would produce 0 1 2 3 4 5 6 7 8 9

>:i.10 would make it 1 2 3 4 5 6 6 7 8 9 10

the [: is used to make the ">:" take only one argument (a monad)
because if it takes two arguments, it is a different function.
so [:>:i.10 becomes 1 2 3 4 5 6 7 8 9 10

}. means take away the first [x] items from the following list,
so 5}.1 2 3 4 5 6 7 8 9 10 becomes 6 7 8 9 10

the two slashes "/" in the code are actually the same
for example, */6 7 8 9 10 becomes 6*7*8*9*10

Great explanation!

You can use [:*/]+i.@- for 10 bytes if you take the range [a, b) as b ([:*/]+i.@-) a such that 10 ([:*/]+i.@-) 5 outputs 15120.

@miles That answer was written when I didn't know J at all :p

Your 8 byte solution won't work if neither argument is positive.

APL (Dyalog Extended), 8 3 bytesSBCS
×/…

Try it online!
… range
×/ multiplication across
This is an "atop" so a(×/…)b is ×/a…b.

R, 21 bytes
Thanks to Dominic van Essen for helping me brainstorm input methods.
prod((a=scan()):a[2])

Uses inclusive range. Try it online!
Explanation
      a=scan()         Read the two inputs as a vector and assign it to a
     (        ):       Use a as the lower end of a range (R interprets this as "use the
                        first element of the vector" by default)
                a[2]   Use the second element of a as the upper end of the range
prod(               )  Take the product of all numbers in the range

Desmos, 19 bytes
f(a,b)=∏_{n=a}^bn

Try it on Desmos!

Minkolang 0.14, 7 bytes
nnL$*N.

Try it here.
Explanation
nn         Takes two numbers from input
  L        Pops b,a and pushes a..b
   $*      Product the whole stack
     N.    Output as number and stop.

Python, 52 bytes
Very simple code; a bit too long.
def p(a,b):
 t=1
 for i in range(a,b):t*=i
 return t

JavaScript (ES6), 45 41 bytes
Saved 4 bytes thanks to @Cᴏɴᴏʀ O'Bʀɪᴇɴ
(a,b)=>[...Array(b-a)].reduce(x=>x*a++,1)

Seems a little too long...
(a,b)=>           // Define an anonymous function that takes parameters a and b, and returns:
[...Array(b-a)]   // An array of b-a items,
.reduce(          // Reduced by
x=>x*a++          //  multiplying each item with the previous,
,1)               //  starting at 1.

That works? kudos! I don't think you need the y in the reduce mapping, so cut it off at x=>x*a++

@CᴏɴᴏʀO'Bʀɪᴇɴ Thanks, that trick works really well!

you should add a semicolon at the end. for the score.

Perl 6, 14 bytes
{[*] $^a..$^b}

usage:
my &code = {[*] $^a..$^b}
say code |$_ for (2,5),(5,10),(-4,3),(0,3),(-4,-1);
# 120
# 151200
# 0
# 0
# 24

say chars code 1,10000;
# 35660

If you wanted to exclude the last element use ..^ instead of ..

gs2, 4 bytes
Hex: 57 0e 4f 65
Mnemonics: read-nums dump crange product
Try it online!
dump pops a list from the stack and pushes its contents (like ~ in GolfScript), and crange gives [a,b).

LabVIEW, 14 LabVIEW Primitives
Range is exclusive. Creates an array from a to b then multiplies all elements.

Java 7, 54 characters
int p(int a,int b){int p=a;while(++a<b)p*=a;return p;}

We cheat the first multiply by assigning it to the temp-product. Then we pre-increment the counter (shamelessly stolen from the input parameter) to skip the first one.
Compare < b instead of <= b - both are to spec, but this saves a character.
Sample:
C:\files>type BadProd.java
class BadProd {
    public static void main(String...args) {
        System.out.println(p(2,5));
        System.out.println(p(5,10));
        System.out.println(p(-4,3));
        System.out.println(p(0,3));
        System.out.println(p(-4,0));

    }
    static int p(int a,int b){int p=a;while(++ajava BadProd
24
15120
0
0
24

43 bytes if you use a lambda: (a,b)->{int p=a;while(++a<b)p*=a;return p;}

Currently on Java 7 - updated to clarify. Good point though!

Came here to create a Java 7 answer, but you beat me to it. :) I noticed yours is exclusive b and uses a loop though, so I made a (slightly shorter) inclusive b method using recursion. Cool to see more code-golfing Java 7 answers, even though you've answered this more than halve a year ago. ;) +1 from me.

dc, 27 bytes
Input assumes a is on top of the main stack and b is under it
dsar[dsc*lc1-dla<A]sAlAxrp

Ungolfed:
dsa        # duplicate 'a', store a copy in register a
r          # reverse top two items on stack
[          # start macro definition
  dsc      # duplicate counter, store in register c
           #  ('b' is the initial counter value)
  *        # pop top two elements of stack, multiply and push result
  lc       # copy the stored counter to the stack
  1- d     # decrement and duplicate it
  la       # copy 'a' to the stack
  <A       # if 'a' is < the counter, run macro A
]sA        # store this macro as A
lAx        # execute macro A
r          # reverse top two elements of stack
p          # pop/print the result

dc, 41 38 37 bytes
This is my first code golf, so bear with me
[lad1+sa*dstlalb>d]sd?sbdst1+saltldxf

It must be saved as a file, and invoked (with bash, so UNIX only) as
dc -f [filename]

It will proceed to wait for input, in the form of a b integers. Note that negative numbers must come as _number.

Alternatively,
echo "X Y [lad1+sa*dstlalb>d]sd?sbdst1+saltdxf" | dc

with X and Y replaced with the two numbers you'd like to product-over-range. This one won't wait unless you don't pipe two numbers.

Explanation:
The recursive macro:
[lad    # load the contents of register a onto the stack, and duplicate it
 1+sa   # Add 1 to the top of the stack (a) and store it in register a
 *dst   # Multiply two off the stack, duplicate and store in register t (stack contains t)
 lalb>d # load a and b, as long as b>a execute d (which is this macro)
 ]sd    # Store that macro in register d
 ?      # Wait for input, hope it is [a b] without braces
 sbd    # store b, duplicate a (stack == a a) (old: sbddsa)
 st     # store a => t (stack == a)
 1+sa   # add 1 to a and store it in a
 lt     # load t since d expects the total to be on the stack
 ldx    # load d and execute it as a macro
 f      # after d is done recursively calling, t will still be on the stack.
        # Print the stack and close (close is implicit)

There was a removal of a spare duplication and store (dsa)

I believe you can omit the q, since dc automatically terminates when it reaches the end of its input.

By the way, another common input method is dc -e "stuff". This will also take input from stdin or piped in from echo. Keep up the good work! dc is my favourite language.

Kotlin, 30 bytes
Range is inclusive
{a,b->(a..b).reduce{c,d->c*d}}

Try it online!

Kotlin, 21 bytes
If you can take input as an IntRange:
{it.reduce{c,d->c*d}}

Try it online!

Branch, 26 bytes
Z}N\;^-[n^\z^*Zn}N^\o^-]z#

Try it on the online Branch interpreter!
Z                   Save the value (the first argument) as register Z
}N                  Increment and save to N
\;                  Go to the right child and copy the parent value
^-                  Go to the parent and subtract (the left child is pre-set as the second argument)
[               ]   While non-zero (basically, while N is not the same as the end)
 n                  Restore register N
  ^\z^              Put Z in the right child and go to the parent
      *Z            Multiply and save to Z; these three lines do Z = Z * N
        n}N         Restore N, increment, and save back to N
           ^\o^-    Compare against register O; automatically set to the second argument
z#                  Restore Z, the product, and output

This is right-exclusive.

K (ngn/k), 11 bytes
{*/x+!y-x}

Try it online!
-1 byte thanks to PyGamer0 for telling me that I don't need ' after +
Another easy one. Exclusive at b.
Explainations:
Assuming that a is 2 and b is 5

{*/x+!y-x}            Main program. Takes x as `a` and y as `b`
      y-x              b-a to fix the range (5 - 2 = 3)
     !                 Range   (0 1 2)
   x+                  += x to each elenent    (2 3 4)
 */                    Product (2*3*4 = 24)

Kotlin, 30 bytes
{a,b->(a..b).reduce{c,d->c*d}}

Kotlin Playground

By turning the type into Int.(Int) -> Int, you can save one byte: {this..it.reduce{c,d->c*d}}

Mouse, 36 bytes
?A:?B:A.I:(A.B.<^A.1+A:A.I.*I:)I.!$

This reads two integers from STDIN and prints an integer to STDOUT. This computes the sum over the closed interval, i.e. [a,b] rather than [a,b).
Ungolfed:
? A:             ~ Read an integer from STDIN, assign to A
? B:             ~ Read STDIN, assign B
A. I:            ~ Begin an accumulator at A
( A. B. < ^      ~ While A [...Array(b-a)].map(_=>b*=a++)|b

Note: map beats reduce once again

Nice, didn't think of that. +1

zsh, 30 bytes
f=({$1..$2})
echo $[${f// /*}]

Sample run:
manatwork% zsh product.zsh 5 10
151200

24 bytes

jq, 36 bytes
(35 characters code + 1 character command line option)
reduce range(.[0];.[1])as$i(1;.*$i)

Sample run:
bash-4.3$ bin/jq -s 'reduce range(.[0];.[1])as$i(1;.*$i)' <<< '5 10'
15120

On-line test (Passing -s through URL is not supported – so input passed as [5, 10].)

TI-Basic, 14 11 bytes
Prompt A,B:prod(randIntNoRep(A,B

Fortran, 44 bytes
Finally a use for those pesky implicit types.
function j(k,l)
j=1
do i=k,l
j=j*i
enddo
end

Test program:
program testProduct
  integer :: a, k, l
  k = -4
  l = -1
  a = j(k,l)
  print*,a
end program testProduct

Vitsy, 14 bytes
Note to self: add range
Expects input as b a.
D{-\[D1+]l1-\*
D               Duplicate the top input.
 {-\[   ]       Repeat the stuff in the brackets by the difference between the
                inputs.
     D1+        Duplicate, add one.
                I now have the range [a,b].
         l1-\*  Multiply all the items together.
This is a function in Vitsy that will leave the product of the range [a,b] on the stack. "But how do I test it?!?" I hear you ask?
Concatenate N. c:
Try it online!

3k rep for you ! :D

\o/ @CᴏɴᴏʀO'Bʀɪᴇɴ

Milky Way 1.5.17, 28 bytes
1%{¢¢L§{?{¢1-e__^}}£*}!

Explanation
1          1             # push integer to the stack
 %{                £ }   # for loop
   ¢¢     ¢              # read a single line of input from the command line
     L                   # push a Pythonic range(0, TOS + 1)
      §{          }      # mapping
        ?{    __ }       # if-else statement
            -            # subtract the STOS from the TOS
             e           # order the TOS and STOS (greater-than)
                ^        # pop the TOS
                      !  # output the TOS

Usage
$ ./mw <path-to-code> -i <input>

Example:
$ ./mw test.mwg -i "2
5"

Milky Way takes line breaks literally. \n is not interpreted as a line break. In future versions, this will be changed.

Arcyóu, 17 bytes
(F(a b)(r *(_ a b

This includes a but excludes b.
Explanation:
(F(a b)    ; Anonymous function F(a, b)
  (r *     ; Reduce by multiplication
    (_ a b ; Range from a to b

PlatyPar, 4 bytes
_XF*

_ gets the range [a,b), X expands it onto the stack, and F* folds multiplication over the range.
Try it online!

Rust, 52 51 bytes
fn p(mut a:i32,b:i32)->i32{for i in a+1..b{a*=i;}a}

Usage (+ ungolfed version) as follows:
fn p(mut a:i32, b:i32) -> i32 {
    for i in a+1..b {
        a *= i;
    }
    a
}

fn main() {
    println!("{}", p(2, 5));
    println!("{}", p(5, 10));
    println!("{}", p(-4, 3));
    println!("{}", p(-4, 0));
}

Uses the current stable version of Rust (1.5.0)

fn p(a:i32,b:i32)->i32{(a..b).fold(1,|a,b|a*b)}. In a future version of Rust: fn p(a:i32,b:i32)->i32{(a..b).product()}.

Java 7, 49 48 bytes
int c(int a,int b){return-~a!=b?a*c(a+1,b):a*b;}

corsiKa's answer is exclusive, mine is inclusive (and slightly shorter by using recursion instead of a loop).
Explanation:
Try it here.
int c(int a,int b){  // Method with two integer parameters and integer return-type
  return-~a!=b?      //  If `a+1` is not equal to `b`
         a*c(a+1,b)  //   Return `a` multiplied by the recursive call with `a+1,b`
        :            //  Else:
         a*b;        //   Return `a*b`
}                    // End of method

PHP, 42 Bytes
<?=array_product(range($ARGV[1],$ARGV[2]))

<?=                         // Open file, '=' is shorthand for 'echo'
array_product(              // Get product of array
range($argv[1],$argv[2])    // array is range from a to b
)

><>, 33 bytes
 1&:@$:@)?\&n;
:$@:+1&*&:/?@@$@)@

My first fish attempt.
Inclusive range
Assumes a and b are on the stack.

Swift, 26 58 bytes
func p(a:Int,b:Int)->Int{return(a+1..<b).reduce(a){$0*$1}}

Fith, 17 bytes (non-competing)
This language was created after the challenge.
{ range product }

Anonymous function. Excludes b. Pretty self-explanatory.
Stack effect: a b -- *[a,b)

Is this your language? :3

@CᴏɴᴏʀO'Bʀɪᴇɴ Yes it is! Mainly inspired by Factor and Haskell. It's concatenative/stack-based.

I guess then {range would be one token, so the whitespace is necessary?

@CᴏɴᴏʀO'Bʀɪᴇɴ Unfortunately, yes.

Are you sure it's not just a successor to Forth? :P

@mbomb007 It's that too :)

tcl, 55
incr p
while \$a<$b {set p [expr $p*$a];incr a}
puts $p

demo

Ahead, 7 bytes
Input is taken as two numbers on standard in. Range is [a,b].
IIEK*O@

II       read two ints and push to stack
  E      expand range between top two stack items
   K     reduce stack by...
    *    multiplying
     O   pop and print number
      @  terminate

Try it online!

F# (.NET Core), 27 bytes
fun a b->Seq.fold(*)1[a..b]

Try it online!

Clam, 5 bytes
p;Brr

Explanation
p     - Print...
 ;    - Product of...
  B   - Range...
   r  - Next input
    r - Next input

Keg -hr, 3 bytes
ɧ∑*

Try it online!
Explanation:
ɧ   # Generate inclusive range from two integer inputs
 ∑* # Calculate product of whole stack
    # Output

Python 2, 30 bytes
f=lambda a,b:b 120).

W, 3 bytes (inclusive)
.*r

Explanation
ab.   % Generate inclusive range from a to b
   *  % Multiplication
    r % Preserve the operation's action & reduce by it

Pip, 6 bytes
$*Ya,b

Try it online!
-1 byte from DLosc.

I'm gonna guess that this is a yank

Yep

Vyxal, 2 bytes
rΠ

Range of a to b, then product
Try it!

Vyxal can also do the inclusive range version in 2 bytes.

Pyth, 4 bytes
*F}F

Test suite
Range is inclusive.

Factor + math.unicode, 12 bytes
[ [a,b] Π ]

Try it online!
It's a quotation (anonymous function) that takes 2 integers from the data stack as input and leaves one integer on the data stack as output.

[a,b] Create a range from two integers. As you may have guessed, this is inclusive of both. All of the other words are also available, such as [a,b).
Π Find the product.

HBL, 2.5 bytes
*(0.,

Uses inclusive range. Try it at HBL Online!
Explanation
After parentheses autocompletion, we have '(*(0.,)):
'(*(0.,))
'(      )  Define a function which returns
  *        the product of
   (0  )   the range from
     .     the first argument to
      ,    the second argument

PostScript, 27 bytes
{1 exch 1 4 1 roll{mul}for}

Anonymous function for inclusive product. Takes two inputs from the stack and leaves output on the stack.
(Usage: e.g., 5 10 {1 exch 1 4 1 roll{mul}for} exec = prints 151200.)
Try it online!

Fig, \$2\log_{256}(96)\approx\$ 1.646 bytes
rR

See the README to see how to run this
Calculates using the range [a, b] (because of bug). Explanation:
rR # Takes input as "a b"
 R # Range [a, b]
r  # Product

I am very sceptical about the 1.646-byte claim, which seems impossible as it isn't an integer number of bits.
The size of a program for code-golf is the size of the program when it is stored.  Other sub-byte-token languages (like Nibbles or seven, for instance) implement ways to actually store the program in the indicated number of bytes/bits, and to do this can even 'cost' extra bits.
Simply declaring that - because you've elected to use only 96 characters - the code 'size' is a multiple of log256(96) isn't sufficient.

I think it would be fairer to score this with the smallest number of bytes/bits that you can actually store the program in (if the 'Fig' interpreter implements base-96 encoding of the program, and is also able to write/read this as binary bits, then this program could be 13 bits, which could even save you 0.17 bits).

@DominicvanEssen see this chat conversation, both above and below. TL;DR it is possible to build an architecture that supports any alog_256(n) byte count. Also it's allowed by the rules

Why do you think it's 'allowed by the rules'?  On CGCC the 'rule' has typically been that languages are defined by their implementation, and that code size is it's actual size when stored.  So if you implement base-96 encoding and store the program then it could be Ok (although I suspect that you'll need bits to finally store it on any existing computer).  This is what Stax implements, for instance.  But not bothering to actually implement it and claiming a 'theoretical' information content seems like a shortcut.

@DominicvanEssen chat, currently accepted rule

Thanks for the link.  I wasn't aware of the new rule/consensus.

How do I pass negative numbers to this program? It appears not to work with anything negative.

@Deadcode oops, thats a bug in my input evaluator. You can append N<number> for the same effect

rRN-1N-4 still does not work, though. It returns 0 but should return 24.

@Deadcode as in N1, not N-1. N is negation

I just realized, your post says it's using an exclusive range, but the program is actually using an inclusive range when I test it with Fig 0.3.2.

@Deadcode hmm, that must be a bug then. Or I can make it a "feature"

Regex  (PCRE2 v10.35 or later), 128 bytes
^(?!-x*,(?!-))(-())?+(?=(x*),-?(x*))(?=(x*),?(?=\3)(?=\4)(x*,-?|[^,]*)(x*))\5,?+(?=(\2(xx)*(?11))?)((?*x+)x?+)*(?*x+)(\5\7(,|$))
Attempt This Online!
Takes its input in unary, as two strings of x characters whose lengths represent the numbers, with optional - signs on their left side, joined by a , delimiter, specifying an inclusive range. Returns the absolute value of its output as the number of ways the regex can match. (The rabbit emoji indicates this output method.)
Additionally, capture group \8 is set iff the result is negative. This value is taken from the last found possible match, if there is a conflict. But this regex always returns a consistent value in it within a run.
It takes two shortcuts:

It assumes that the left argument is less than the right argument. This isn't necessary, and in fact removing this assumption wouldn't cost many bytes.
If the two arguments have different signs, it doesn't even bother calculating anything, because the result will always be zero. This isn't a necessary shortcut (it worked without it), but it results in a much shorter regex.

^
(?!
    -x*,(?!-)           # If A is negative and B is nonnegative, let there
                        # be no possible matches, as the product would be 0.
)
(-())?+                 # \2 = set if A is negative
(?=
      (x*),             # \3 = abs(A);
    -?(x*)              # \4 = abs(B)
)
(?=
    (x*),?(?=\3)(?=\4)  # \5 = what to skip so tail = the larger of A or B;
                        # tail = the larger of A or B
    (x*,-?|[^,]*)(x*)   # \7 = {the smaller of A or B} - \5
)
\5                      # tail = the larger of A or B
,?+                     # skip sign of B, if any
                        # First handle the range from larger inclusive to
                        # {smaller inclusive or 0 exclusive}
(?=
    (\2(xx)*(?11))?     # \8 = set iff the inclusive range is negative and has
                        #      an odd number of total members, i.e. the product
                        #      is negative
)
(
    (?*x+)              # Multiply the number of possibilities by tail.
    x?+                 # Advance by 1, but if already at the end, allow the
                        # loop to iterate once more so as to include 0 in
                        # the count.
)*                      # Iterate any number of times (cover the whole range)
(?*x+)                  # Multiply the number of possibilities by tail again
                        # at the end of the range.
(                       # Define subroutine (?11)
    \5\7                # Clamp the range at the smaller end.
    (,|$)               # Assert that we've reached the end.
)

As far as I know, this absolutely requires non-atomic lookaround (used here as (?*...) molecular lookahead) and -output, so it would not be portable to other regex engines currently – though it would be easily portable to  ECMAScript+(?*).

golflua, 26 characters
\p(f,t)~@i=f+1,t f=f*i$~f$

Sample run:
Lua 5.2.2  Copyright (C) 1994-2013 Lua.org, PUC-Rio
> \p(f,t)~@i=f+1,t f=f*i$~f$
> w(p(5, 10))
151200

C#, 66 bytes
Not great, but not too bad.
int d(int a,int b)=>Enumerable.Range(a,b-a).Aggregate((x,y)=>x*y);

I believe you need to include the using System.Linq; in order to use aggregate.

Hassium, 49 Bytes
func f(a,b){t=a;for(x=a+1;x<b;x++)t=t*x;print(t)}

See expanded and run online with test case here

Befunge, 51 bytes
 v          @.$<
v>&20p&30p1
>20g*20g:30g-!#^_1+20p

This can probably be optimised with some stack manipulation wizardry.
I went for put and get instructions instead. Might get back to it later on.
Also fails with negative numbers, since AFAIK Befunge doesn't handle them, instead looping back to maxint.

, 4 chars / 11 bytes
⨴⩥…ï

Try it here (Firefox only).
Creates an exclusive range from the array input, and multiplies everything in the resulting range. (Note that although the interpreter is using v2 of the language, this code still works in v1.)

Python 56
a=input()
b=input()
print reduce(int.__mul__,range(a,b))

print reduce(int.__mul__,range(input(),input())) is shorter.

Detour, 3 bytes (non-competing)
rP.

Try it online!
Same as @quartata's Jelly answer, except . is required to output the result so it doesn't wrap back around to r.
This was not intended to be a golfing language, but the 1-character commands necessary to operate on a 2d grid make small challenges like this really short.

CoffeeScript, 46 45 44 29 bytes
Inclusive range
29 bytes version (anonymous function):
(a,b)->c=a;c*=++a while a<b;c

Equivalent to next JS code:
(function(a, b) {
    var c;
    c = a;
    while (a a*b

45 bytes version:
alert [prompt()..prompt()].reduce((a,b)->a*b)

46 bytes version:
alert([prompt()..prompt()].reduce((a,b)->a*b))

Reng v.3, 25 bytes
This is encoded in ISO 8859-1, and you can try it out at the new IO page!
ii#x:1+::xe)2(¿Bh$1¶a*¡n~

Is an inclusive range.
ii takes 2 inputs, and stores the second one (the maximum) in x. :1+:: sets a to a (a+1) (a+1) (a+1). xe sets the TOS to the equality of the counter (a+1) and )2( sets the STOS to 2. ¿ pops two numbers and, if the TOS is true, the pointer moves STOS times. Otherwise, we just go forward. In the event that we have not reached the maximum, Bh goes back 11 units. $ drops the excess counter from the TOS once we are done looping. 1¶ sets the default pop from an empty stack to 1, so we can use a double-sided mirror loop to multiply everything. a is a one-sided mirror, and * multiplies values. ¡ mirrors until the stack's length is 1. Once the length is 1, n~ is met and outputs the result and exits the program.

Factor, 79 43 29 bytes
Hooray for auto use!
It's quite elegant, really. A lambda, that goes on the stack.
[ 1 - [a,b] 1 [ * ] reduce ]

Mathcad, 4 "bytes"
Uses the built-in Iterated Product Operator, which is entered from the keyboard by ctl-#.  Type k into the iterator and expression placeholders and then type the evaluation operator (=), giving a total of 4 "bytes" where one byte is taken to be the number of characters needed to enter an expression.

Matricks, 24 bytes
Matricks is a new esolang I invented to deal with matrices. Run like: python matricks.py [[<num1>,<num2>]]
mg:;+c:1:g:1;-g:;;kp{};;

This is a simple answer. Matricks has a built-in for taking the product of an array, p, so all I need to do is make the range with the constructor, m

k/kona, 8 bytes
*/a+!b-a

Let's break this down:
k reads right-to-left, so:
b-a finds the difference between b and a, to give the number of numbers required
!(b-a) generates a list from 0 to (b-a), giving the range [0, (b-a))
a+(!b-a) adds a to each element of the list, to get the range [a, b)
*/(a+!b-a) applies multiplication over all elements of the list; * is the multiply operator, and / is the over adverb, which is like a map/reduce function, applying its left-hand argument over all elements of its right-hand argument.

Racket (scheme), 29 bytes
Functional programming woot
Apply applies a function to all elements of a list, and range creates a list ranging from a to b. The function being applied is *. Exclusive.
(λ(a b)(apply *(range a b)))

Perl 6 - 15 bytes
{[*] $^a..$^b}

Usage:
> {[*] $^a..$^b}(2,5)
120

Forth, 33 bytes
Pretty simple looping program.
: f DUP ROT DO DUP I * LOOP ; f .

Try it online

JavaScript (using external library) (31 bytes)
 (a,b)=>_.RangeTo(a,b).Product()

Link to lib: https://github.com/mvegh1/Enumerable/
Explanation of code: Anonymous method accepts low bound and high bound for range, and uses built in .Product method to produce the product for that range

C#, 56 Bytes
int f(int a,int b){var r=1;for(;a<b;a++)r*=a;return r;}

Excel, 37 bytes
=PRODUCT(A2-ROW(OFFSET(A1,,,A2-A1)))

Data will be a in A1 and b in A2.
The above should be entered as an array formula (ctrl_shift_enter) in any other cell. The result is exclusive of b.

Pushy, 8 bytes
Non-competing as the language postdates the challenge.
w-:&h;P#

Try it online!
Most of the code is building the range, as there is a builtin for finding the product (P).
w          \ Mirror stack, yielding [a, b, a]
 -         \ Pop (b, a) and push b - a, the difference
  :  ;     \ That many times do:
   &h      \   Push last item +1
      P#   \ Print product

The w-:&h; is essentially a long-winded binary range function, as Pushy only has unary range commands.

Triangular, 21 20 bytes
$\S=t$iUprP%..%/*U:<

Try it online!
Takes input with order b, a from standard in.
Ungolfed: (Explanation to be added later)
      $
     \ S
    = t $
   i U p r
  P % . . %
 / * U : <

Previous Version (21 bytes):
1\P\p$?Ud$=0%)(/P*U:<

JavaScript (ES6), 25 bytes
f=(a,b)=>a-b?a*f(a+1,b):b

Inclusive.

Perl 5 -MList::Util=product -p, 16 bytes
$_=product$_..<>

Try it online!

Perl 6, 14 bytes
{[*] [...] @_}

Try it online!
Reduce the two inputs by range, then reduces by multiplication.

GolfScript, 8 bytes
Idea copied from the gs2 solution.
~,\>{*}*

Try it online!
Explanation
~        # Dump the input,            e.g. 2 4
 ,       # Generate range from 0 to input: 2 [0 1 2 3 4]
  \      # Swap the stack                : [0 1 2 3 4] 2
   >     # Keep all those that are larger: [2 3 4]
    {*}* # Reduce by multiplication      : 24

The \ is not necessary and this does not work with negative numbers.

Gol><>, 13 bytes
I::I-F$M:@*|h

Try it online!
Takes b then a from stdin, and uses inclusive range.
How it works
I::I-F$M:@*|h

I::I-           Take b, duplicate twice, take a, subtract
                [b b b-a]
     F     |    Repeat b-a times:
                [counter product]
      $M          Swap two, decrement counter
                  [product counter-1]
        :@        Duplicate, rotate 3
                  [counter-1 counter-1 product]
          *       Multiply
                  [counter-1 product']
            h   Print top as number and exit

C# (Visual C# Interactive Compiler), 37 bytes
int f(int a,int b)=>aa>b||a*f(a+1,b)

or
f=(a,b)=>[...Array(b-a).keys()].map(i=>i+a).reduce((a,b)=>a*b)

Python
f=lambda a,b:reduce(lambda x,y:x*y,range(a,b))

Arn, 5 bytes
ë|¶Ý║

Try it!
Explained
Unpacked: *\(=>\
  \           Fold with
*             Multiplication
    (         Begin expression
        \     Fold with
      =>      Inclusive range
          _   Variable initialized to STDIN; implied
    )         End expression; implied

The power of the fold operator, alternatives would be *\=>?1 or *\=>:} (hypothetically, for some reason they are broken as of typing this. Trying to fix).

Scala, 9 bytes
_.product

Try it in Scastie
Accepts input as a Range object (inclusive or exclusive).

O, 12 bytes
[j:v,;]jv-+*

Try it online!
[j:v            Input and save to v without popping
    ,;          Range (1..n inclusive)
      ]jv-      Range end - start
          +     Add it vectorised with range
           *    Product

Husk, 2 bytes
Π…

Try it online!
   # arguments (² => second last argument & ⁰ => last argument) are implicit
 … # inclusive numeric range
Π… # product of list

x86-16 machine code, 10 bytes
00000000: 8bc8 f7eb 4b3b d97f f9c3                 ....K;....

Listing:
8B C8       MOV  CX, AX         ; running product start at a
        MUL_LOOP:
F7 EB       IMUL BX             ; multiply running product by b
4B          DEC  BX             ; decrement b
3B D9       CMP  BX, CX         ; is b > a?
7F F9       JG   MUL_LOOP       ; if so, go forth and multiply
C3          RET                 ; return to caller

Input a in AX, b in BX, inclusive of b.  Output to AX.
Tests using DOS DEBUG:

Note: before anyone asks... you cannot use LOOPNZ to decrement and compare a and b.
In the case where input a (CX) is 0, it will end the loop before multiplying by the value of a, so no good.

dc, 23 bytes
dsc[lc1+dsc*lclb>g]dsgx

Takes input with the upper bound (inclusive) in register b and the lower bound (inclusive) at the top of the stack. Returns the answer at the top of the stack.
Uses register c a lot, so removing that would save a lot of bytes. Basically it's just a for-loop.
Run as:
{UPPER_BOUND}sb{LOWER_BOUND} dsc[lc1+dsc*lclb>g]dsgx p

Ly, 23 11 bytes
&nRy[p*y,]p

Try it online!
Let's try not doing it the "hard way" this time... :) The code generates a sequence of numbers on a stack, then works through the stack multiplying entries until there's only one number.  When the program ends, that single entry prints as a number automatically.
&nRy[p*y,]p  -
&n           - read in the two numbers
  R          - generate a range of numbers (inclusive)
   y[p y,]p  - as long as the stack size is 2 or more
      *      - multiply the top two entries

Nim, 47 bytes
proc f(a,b,c:var int)=
  c=1;for i in a..b:c*=i
Attempt This Online!
All arguments must be variables, passed by reference. Return value in third parameter, original value ignored. As usual with Nim, not very small byte count.

Nibbles, 2.5  bytes (5 nibbles)
`*>$,

Input is (a,b]  (so 5 10 represents the range 6 7 8 9 10).
    ,      # range from 1..(implicit) arg1
  >        # drop first      elements
   $       #            arg2
`*         # product

APL, 12 bytes
{⍺×.-1-⍳⍵-⍺}

Explanation on example of arguments 2 and 5:
⍳⍵-⍺ ⍝ Array of numbers from 1 to ⍵-⍺: 1 2 3
1-   ⍝ Substract the array from 1: 0 ¯1 ¯2
⍺×.- ⍝ Substract the array from ⍺: 2 3 4
     ⍝ Then reduce by multiplication, of course

Mathematical justification: ⍺-(1-x) = (⍺-1)+x

Knight, 34 bytes
;;;;=xP=yP=p 1W<=x+1x+2y=p*p-x 1Op

Try it online!

You should shave a two bytes off by doing =pT (you'd have to not make it the last assignment, though, as it'd conflict with the W), and then doing =p*-xTp.

Arturo, 12 bytes
$=>[∏&..&]

Try it

HP48 User RPL,
Input is a and b in the stack.
«
  'X'
  DUP
  4 UNROLL
  UNROT
  1 SEQ
  ∏LIST
»

Pyt, 2 bytes
ŘΠ

Try it online!
Takes inputs as b, a separated by newlines

><> (Fish), 29 bytes
&1$:&v
v?=&:<|.!02$*@+1:
>~n;

Try it

BQN, 7 bytes
×´⊢+↕∘-

Thanks to @ConorO'Brien
Try it
BQN, 10 bytes
{×´+↕¬}

Try it
Uses an inclusive range. This is the first thing I've ever written in BQN and I couldn't figure out how to make it tacit for the life of me. Any tips appreciated. :)

I'm not great at BQN, but I think you have this for 7b (arguments reversed, exclusive at one end): ×´⊢+↕∘- (Try it)

Itr, 5 bytes
â-º+P
solution for exclusive range
online interpreter
Explantion
â-º+P ; implicit input, stack: [hi low]>
â     ; under -> stack: [low hi low]>
 -    ; subtraction -> stack: [low hi-low]>
  º   ; zero-based range
   +  ; add low to zero based range giving range [low,...hi-1]
    P ; product
      ; implicit output

Itr, 7 bytes
solution for inclusive range
â-1+º+P
2 bytes using the new range built-in
¨P

Pascal, 76 B
Utilizing a recursive definition of the product you may arrive at one of the following solutions:
function p(a,b:integer):integer;begin if a=b then p:=a else p:=a*p(a+1,b)end

function p(a,b:integer):integer;begin if aa then p:=a*p(a+1,b)else p:=a end

86 B (standard iterative solution):
Pascal’s for-loop limits are inclusive (just like the \$\prod\$ and \$\sum\$ limits in mathematics are inclusive, too).
In Standard Pascal (as specified by ISO standard 7185) for-loop counters must fulfill certain eligibility criteria (some dialects may be more lenient with that).
Therefore a new variable is declared:
function p(a,b:integer):integer;var i:integer;begin for i:=a+1 to b do a:=a*i;p:=a end

Charcoal, 20 bytes
≔¹ξＮαＮβＦ…αβ«≔×ξιξ»Ｉξ

Try it online!
Verbose
Assign 1 x
InputNumber a; InputNumber b;
for(Range a b){
    Assign (Times x i) x
}
Print Cast x

Try it online!

Thunno 2, 2 bytes
Ip

Attempt This Online! Uses \$[a..b]\$ (the inclusive range).
Explanation: product of the Inclusive range between the two inputs.

J-uby, 9 bytes
:!~|:/&:*

Attempt This Online!

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
When Bullets Collide
This challenge is based off a riddle I read in some book a while ago, which I found again here. It is about bullets fired from a gun once per second at varying speeds that travel in a straight line forever. When one bullet hits another, both are destroyed completely. (Feel free to replace all instances of "bullet" with "missile".)
The Task
Given a list of bullet speeds in the order they're fired in, determine whether all bullets are destroyed.
The Rules

Input is a list of non-negative integers, separated by any delimiter and with one optional character before and after. These are valid inputs: 1 2 3 4 5 6 and [1,2,3,4,5,6]. The programmer makes the choice.
Output a truthy value if at least one bullet survives forever and a falsy value otherwise.
Bullet speeds are given in units per second.
Bullets move simultaneously and continuously.
Bullets may collide at fractional offsets.
Multiple bullets which simultaneously reach the exact same position, whether at an integral or fractional offset from the origin, all collide with each other.

Examples
In these diagrams, G represents the gun, > the bullets, and * are times when bullets collide and explode.
Truthy
Input: 0
        0123456789
Time 0 G>
     1 G>
     2 G>
   ...

Output: 1

Input: 0 0 0
        0123456789
Time 0 G>
     1 G*
     2 G>
     3 G>
     4 G>
   ...

Output: 1

Input: 1
        0123456789
Time 0 G>
     1 G >
     2 G  >
     3 G   >
   ...

Output: 1

Input: 2 1
        0123456789
Time 0 G>
     1 G> >
     2 G >  >
     3 G  >   >
     4 G   >    >
   ...

Output: 1

Input: 2 3 1
        0123456789
Time 0 G>
     1 G> >
     2 G>  >>
     3 G >    *
     4 G  >
     5 G   >
   ...

Output: 1

Falsy
Input: 1 2 3 4 5 6
        Unit      1111111111
        01234567890123456789
Time 0 G>
     1 G>>
     2 G> *
     3 G>  >
     4 G>   > >
     5 G>    >  >>
     6 G      >   > *
     7 G            >  >
     8 G                  > >
     9 G                        >>
    10 G                              *
                  111111111122222222223
        0123456789012345678901234567890

Output: 0

Input: 1 0 0 3
        Unit
        0123456789
Time 0 G>
     1 G>>
     2 G* >
     3 G>  >
     4 G   >>
     5 G     *

(The second collision is at time 4.5)
Output: 0

Input: 2 1 2 3 6 5
        Unit      1111111111
        01234567890123456789
Time 0 G>
     1 G> >
     2 G>>  >
     3 G> *   >
     4 G>  >    >
     5 G>     *   >
     6 G     >      >
     7 G          >   >
     8 G               >>
     9 G                *
                  1111111111
        01234567890123456789

Output: 0

Input: 2 3 6
        Unit
        0123456789
Time 0 G>
     1 G> >
     2 G>  >>
     3 G      *

Output: 0

can i require input be delimited like 1<enter>2<enter>3...?

@sysreq: That's pushing it, but I'll allow it.

I agree with qunitopia - this challenge is wicked hard, but I'm working on a solution...

Python 2, 388 392 388 346 342 336 331 bytes
z=k=input();l=len(k);v=range;u=v(l)
while l<z:
 r="";o=[r]*l;z=l
 for h in v(l):
    if r:o[h-1]=o[m]=r;m=h;r=""
    for j in v(h+1,l):
     p=k[h];q=k[j];t=u[j];n=(1.0*q*t-p*u[h])/(q-p)if q-p else""if p>0 else t
     if t<=n<r<()>o[j]>=n<=o[h]:r=n;m=j
 i=0;s=o and min(o)
 while i<l:
    if o[i]==s!="":del k[i],o[i],u[i];l-=1
    else:i+=1
print l

My god this thing is huge, but I believe it actually does work. Once you see all the intricacies of it, this challenge is ridiculously hard.
I'm not sure if I can explain how it works in detail without typing for hours, so I'll just give an executive summary.
The big main while loop is looping until the input list does not shrink.
The nested for loop (can you believe a nested for loop is actually the shortest here?) loops over each bullet speed and uses numpy.roots to calculate calculates at which time that bullet will collide with each bullet that comes after. Here, "" is being used to mean infinity (no intersection). An extra conditional has to be included to ensure that stopped bullets are marked as colliding the moment they appear rather than at time zero.
For each number we keep track of which bullet it will hit soonest, if any, and then o is updated with the minimum collision times for the involved bullets.
After this double loop terminates, we iterate over the input list and delete any bullet that will collide at the minimum of all collision times, if any. This allows us to simultaneously delete large numbers of bullets if they all happen to collide at the same moment.
Then we repeat the entire process on the remaining bullets, since they may be able to get by now that the bullets that they would have collided with have been destroyed.
As soon as no bullets are deleted (indicated by the list not shrinking), we escape the while loop and print the length of the remaining list. Thus, this program not only prints truthy if bullets survive, it actually prints exactly the number of bullets that survive.
EDIT: Special thanks to feersum for generating test cases to help me find bugs.
EDIT 2: Saved 42 bytes by solving the linear equation by hand instead of using numpy, and splitting out the starting times into a separate list and restructuring a conditional.
EDIT 3: Saved 4 bytes by renaming range
EDIT 4: Saved 6 more bytes by replacing double spaces with tabs.
Also, feersum was kind enough to provide his implementation using fractions and sets for comparison. I've golfed it a bit and it comes out to 331 bytes, tying my solution.
EDIT 5: saved 5 bytes by removing an unnecessary initialization and rewriting a conditional

Did you not test the example inputs again? [1, 0, 0, 3] doesn't work.

@feersum that was the only one I didn't test, dangit. but fixed. WITH ALL THIS EFFORT I BETTER GET AN UPVOTE. :P

Still doesn't work. [1, 16, 18, 20, 30] should return 1.

OK it seems to work now, most of the time at least.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Can I string all my cords and adapters together?
Suppose one day you are digging through your big box of unused computer cords and adapters (USB to USB mini, VGA to DVI, etc.). There are tangled cords everywhere making quite a mess, and you wonder if you could simplify things by attaching all the cords together in one long strand, and then just rolling it up.
The question is, is it possible to connect all of your cords and adapters in one long line like this? It's obviously not always possible, e.g. if you only had two cords with completely different plugs, they could not be connected together. But if you had a third cord that can connect to both of them, then you could string all your cords together.
You don't care about what type of plugs are on the ends of the all-cord strand. They don't need to plug into one another to form a loop. You only want to know if making the all-cord strand is possible, and if it is, how to do it.
Challenge
Write a program or function that takes in a multiline string where every line depicts one of the cords you own. A cord is made up of one or more dashes (-), with a plug on either end. A plug is always one of the 8 characters ()[]{}<>.
So these are some valid cords:
>->
(--[
}-{
<-----]
(---)

But these are not:
-->
(--
)--
[{
---

When connecting cords, only plugs with the exact same bracket type can be connected together.
So these are some valid cord connections:
...---((---...
...---))---...
...---]]---...
...---{{---...
...---<<---...

And these are invalid:
...---()---...
...---)(---...
...---{]---...
...---{[---...
...---><---...
...--->)---...

If all the cords in the input can be rearranged and attached together in one long strand, then output that strand to stdout on one line (with an optional trailing newline). When there are multiple solutions you can choose any one of them to output. If making a single strand is not possible, then output nothing (or output an empty string with an optional trailing newline).

For example, if the input is
[-->
{---]
>----{

the output could be
[-->>----{{---]

where all the cords are strung together.
However if the input were
[-->
{---]

the cords cannot be connected so there would be no output.

Note that cords can be flipped around as much necessary to make connections. e.g. [--> and <--] are effectively the same cord because they can make the same type of connections. Some outputs may depend on flipping the input cords.

For example
(-[
}--]

could have output
(-[[--{

where the second cord is flipped, or
}--]]-)

where the first cord is flipped.
(Note that in general flipping the entire output is valid because it's the same as initially flipping every cord individually.)

The lengths of the cords in the output should of course match the lengths of the corresponding input cords. But the cords may be reordered and flipped  around as much as you want in order to make the all-cord strand. The input will always contain at least one cord.
The shortest code in bytes wins.
Test Cases
Cases with output:
[-->
{---]
>----{
gives
[-->>----{{---]
or
[---}}----<<--]

(-[
}--]
gives
(-[[--{
or
}--]]-)

(-)
gives
(-)

[--{
gives
[--{
or
}--]

[-]
]-[
gives
[-]]-[
or
]-[[-]

[----->
)------------[
{--<
}---)
could give
[----->>--}}---))------------[
or
>--}}---))------------[[----->
or
}---))------------[[----->>--}
or
{--<<-----]]------------((---{
etc.

>-->
>->
>--->
could give
>-->>->>--->
or
>--->>-->>->
or
>->>-->>--->
or
<--<<---<<-<
etc.

(-]
]->
>-}
}-)
)-[
[-<
<-{
{-(
could give
(-]]->>-}}-))-[[-<<-{{-(
or
{-((-]]->>-}}-))-[[-<<-{
or
<-{{-((-]]->>-}}-))-[[->
etc.

Cases without output:
[-->
{---]

[-]
[-]

(-]
]->
}-)

>->
>-->
]---]

[-------------------]
]-------------------[
[-----------------]
[-----------------]

{--[
]--}

big box of unused computer cords and adapters  That makes me feel better - I'm not the only one.  Actually I have several of these boxes.

but what if you plug a cord into itself?

Are the cords guaranteed to all be valid?

@R.Kap Yes they are

Unreadable, 3924 bytes
This is the first time I implemented somewhat of a call-stack-like structure in Unreadable.
(The first version of this was over 5300 bytes, just to give an idea of how much I golfed this.)

'"""""'""'""""""'""""""'"""'""'""'""'""'""'""'"""""""'"""'""""""'""'"""'""""""""""'""""'""""'""""'""""""'""'""'""'""'""'""'"""""""'"""'"""""'"""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""'""'""'"""""""'"""'""""""""""'""""""""'"""'"""'""""'""""""'""'""'""'""'"""'"""""""'""'""'"""""""'"""'""""""'""'"""""""'"""'""'"""""""'""'"""""""'"""'"""""'""""""'""'"""'"""""""'"""""""'"""'""""'""""""'""'""'""'"""""""'"""'"""""""""'""""""'""'"""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'"""""""'""'"""'"""""""""'""""""'""'"""'""""""""'"""""""'""'"""'"""""""""'""""""'""'"""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'"""""""'""'"""'"""""""""'""""""'""'"""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'"""""""'""'"""'"""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'""""""""'"""""""'""'"""'""""""""'""""""""'"""""""'"""""""'"""'""'""'"""""""'"""""""'"""'""'""'"""""""'"""""""'"""'""'""'"""""""'"""""""'"""'""""""""'"""""""'"""""""'"""'""'"""""""'"""""""'"""'""""""'"""'""'""'"""""""'"""'""""""'""'""'""'"""""""'"""'"""""""'""""""""'"""""""'"""'""""""""""'""""""'"""""""'"""'""""""""'""""""'""'""'""'"""'""""""'""""""'""'"""'""'"""""""'"""'"""'"""""'"""""""'""'""'""'"""'""""'""""'""""""'""'""'"""'""""""'"""'"""'"""""'"""""""'""""""'"""'""'""'""'""'""'"""""""'"""'"""""""""'"""""""'""'""'""'""'"""""""'"""'"""'""""""'""'""'"""'""""""""'"""'"""""""""'"""""""'""'""'"""'""""""'""'""'""'"""'""""""""'"""'""""'""""'""""""'"""'"""""""'"""""""'""'"""'"""""'"""""""'""""""'"""'""'""'""'""'""'"""""""'"""'"""""""""'"""""""'""'""'""'""'"""""""'"""'"""'"""""""""'"""""""""'"""""""'""""""""'"""""""'""'"""'""""'""""'""""""'""""""""'"""'"""""""'""'""'"""""""'""""""""'"""""""'""'"""'""""""'""'""'"""'""'"""""""'"""""""'"""'"""""""""'"""""'""""""'""'""'"""'""""""""'"""""""'""'""'"""'""""""'""""""""'"""'""""""""'"""""""'""""""""'"""'""""""""'"""'"""'"""'""""""'"""'""""""""'""""""'""'""'"""'""""""'"""""""'""'"""'"""""""'"""'"""'"""""""""'"""""""'""'""'"""'""""""'""""""'""'"""'""'"""""""'""'"""'""""""'"""""""'"""'""""""'"""""""""'"""""""'""""""""'"""""""'"""'""'""'""'""'""'"""""""'"""'""""""""'""""""""'""""""""'""""""""'""""""""'"""""""'"""'"""'"""""""""'""""""'"""'"""""""'""""""'""'"""'""""""""'"""""""'""'"""'""""""'""'""'""'""'"""""""'"""'""""""'"""""""""'"""""""'""'""'""'"""""""'"""'""'""'""'""'""'""'""'""'""'"""""""'"""'""""""""'"""""""'"""'""""""""'"""'""""""'""'""'""'"""'""""""""'"""'"""""""""'"""""""'"""'"""""'""""""""'"""""""'""""""'"""'""'"""""""'"""'""""'""""'"'"""""""'"""""""'"""""""'"""'"""""'""'""""""'""'"""""""'"""""""'"""'""""""""'"""""""'""'"""""""'"""""""'"""'"'"""""""'""'""'""'""'"""'"'"""""""'""'""'"""""""'"""""""'"""'"""

Explanation
Consider this example input:
>--{
[---}

Throughout most of the execution, the tape is laid out as follows:

Cells 0 to 5 are locations for various variables.
Cell 6 onwards contain all information about the set of cables in your box:

The remaining cells after the “zero terminator” contain the stack. Each “stackframe” is a single cell that points to the first cell of a cable (the “start plug” cell). In the above example, when the program decides it has found a solution, the stack will contain 6 (referring to >--{, the first cable) and 21 (referring to {---], the mirror of the second cable).

The program proceeds in three main stages:

Read the entire input and generate the above structure, including all the mirrored cables.
Try out all combinations (but stop if a solution is found).
If a solution was found, output it.

The first stage (read input and generate cables structure) only uses cells #1 (which I’ll call p) and #2 (which I’ll call ch) and operates in a while loop as follows:

While condition: increment p by 6, read the next character (start plug) into cell *p, and check that it isn’t -1 (EOF).
Read subsequent characters into *(p+2), and count them in *(p+1), until we encounter anything other than - (hyphen). At that point, *(p+1) will contain the number of hyphens (cable length) and *(p+2) the last non-hyphen character (the end plug). (We also copy the hyphen characters to cell #5 so we can access this ASCII code later in the output stage.)
In a while loop, find the mirror plug and store it at *(p+3), then increment p by 2, until *p is zero. The loop looks like this in pseudocode:
while (ch = *p) {
    *(p+3) = (ch -= 40) ? (ch -= 1) ? (ch -= 19) ? (ch -= 31) ? ch-32 ? *p-2 : *p+2 : *p+2 : *p+2 : *p-1 : *p+1
    p += 2
}

This loop will always perform two iterations (the start plug and end plug) and store the results in the fourth and sixth cell of this cable. Now, if you paid attention, you realize that the sixth cell is indeed the correct location for the mirrored end plug, but the mirrored start plug is in the cell labeled “boolean indicating original cable”. This is OK because we only need this cell to be a non-zero value.
Since p has just been incremented a total of 4, it’s now pointing at the cell labeled “boolean indicating cable is in use”. Set *(p+3) to the value of *(p-1). This puts the mirrored start plug in the right place.
Read (and discard) one more character (which we expect to be a newline, but the program doesn’t check for that).

p initially starts out at 0 but is incremented by 6 inside the while condition, thus the cable data starts at cell #6. p is incremented by 4 inside the loop body, and thus a total of 10 for each cable, which is exactly what we need.
During the second stage, cells #0–4 are occupied by variables that I’ll call a, p, q, m, and notdone. (Cell #5 still remembers the ASCII code of the hyphen.)
To get ready for stage 2, we need to set *p back to 0 (the cell labeled “zero terminator”) so that it can act as the terminator for the list of cables; we also set q (which is our stack pointer) to p+1 (i.e. the cell after the “zero terminator”; this is where the stack starts); *q to 1 (the first item on the stack; why 1 will become apparent later); and notdone to 1. All this is done in a single statement:
*p = (notdone = *(q = p+1) = 1)-1

The second stage is also a while loop. Its condition is simply notdone. In each iteration of that while loop, any one of the following four things could happen:

We find that all cables are marked “in use”. This means we’ve found a solution (which is represented by the current stack contents).
We can advance *q to another eligible cable (which we promptly mark as “in use” along with its twin) and then recurse (i.e. create a new stackframe).
We cannot advance *q because no further eligible cable exists, so we need to backtrack (remove a stackframe and mark the previous cable and its twin as no longer “in use”).
We cannot advance *q because no further eligible cable exists and we cannot backtrack because we have reached the bottom of the stack. This means there is no solution.

The loop body checks for each of these four conditions in this order. Here are the details:

Set m and p to 1 and in a while loop, increment p by 5 (thus iterating through the cables) and check if *(p+4) (“in use”) is set. If it isn’t, set m to 0. At the end of that loop, m tells us if all the cables are in use. If so, set notdone to 0 to terminate the main loop. Otherwise, continue at step 2 below.
Set p to *q (the cable at the top of the stack) and in a while loop similar to the above, increment p by 5 to iterate through the cables. Starting at *q ensures we only consider those that we haven’t already considered before; however, remember that the initial value for a new stackframe is 1, so the first cable looked at is the one at cell 6, which is indeed the first cable.
For each cable, we need to check *(p+4) to ensure that it’s not already in use, and also that either *(q-1) is zero (meaning we’re at the bottom of the stack, so there’s no constraint on the start plug), or *p (the cable’s start plug) is equal to *(*(q-1)+2) (the end plug of the cable just below on the stack). We check for equality by setting a to *(*(q-1)+2) and m to *p+1 and then decrementing both in a while loop. The +1 is because m is decremented inside the while condition, so it is decremented once more than a. If a is zero at the end of this, the two plugs are equal.
Thus, if either *(q-1) was zero or the equality comparison succeeded, the cable is eligible. Set *q to p to replace the cable at the top of the stack with the new one; set m to the same to indicate that we found a matching cable; and then decrement p. That decrement is a little trick to cause the while loop (iterating through the cables) to terminate early; it will increment p by 5 again, thus taking it to the cell containing this cable’s “in use” flag, and we know that’s zero because we just checked that.
Finally, after the cable-iterating while loop, we check if m is non-zero. If so, we found a matching cable and p is pointing at the “in-use” flag for that matching cable. Set it to 1 to mark it as in use. Also set *(*(p-1) ? p+5 : p-5) to 1 to mark its twin as in use. Finally, increment q and set the new *q to 1 to create a new stackframe.
If, after the cable-iterating while loop, we find m to be zero, there are no more matching cables, so we need to backtrack. Decrement q to move down the stack and check if it’s still pointing at a cable (a non-zero value). If so, mark that cable and its twin as no longer in use. (We store the value of *q in p to make this expression shorter in code.)
If, after decrementing q, we find that it points at a zero value, then that is the “zero terminator”, which means we’ve underrun the stack. We conclude that there is no solution. We set notdone to 0 to terminate the main loop.

The third stage is the output stage. There are two things that can happen:

the main loop found a solution that we need to output, or
the main loop concluded there is no solution and we output nothing.

Conveniently, if there was no solution, p is zero because we set it to the value of *q before checking that for zero; and if there was a solution, p is pointing at the “zero terminator” because it just iterated through the cables, so we can now use p to iterate through the stack. So just iterate through the stack, outputting for each cable the start plug (*(*p)), the hyphens (by decrementing *(*p+1) in a while loop; and using the hyphen ASCII code stored in cell #5), and the end plug (*(*p+2)). Never mind that this destroys the cable-length information; we don’t need that anymore.

CJam, 67
qN%e!{_,2,m*\f{.{_{"()[]{}<>--"_@#1^=}%W%?}_2ew{~\W=#}%0-{;}&}~}%1<

Try it online
Note: the link is using the latest code from the repository (pushed but not yet released), as it contains a bug fix.
Explanation:
The program simply tries all permutations and all orientations of the cords.
qN%             read the input and split into lines
e!              generate all permutations
{…}%            map each permutation of cords
  _,            get the number of cords (n)
  2,m*          generate all patterns of n bits (cartesian power of [0 1])
  \f{…}         for each bit pattern and the cord permutation
    .{…}        apply the block to each bit and cord (flipping cords for bit 0)
      _         duplicate the cord
      {…}%      map each character of the cord
        "…"_    push the string of all the plugs (and 2 dashes) and duplicate it
        @#      get the index of the character in the string
        1^      XOR with 1
        =       get the character at this new index (plugs get toggled)
      W%        reverse the cord
                 the stack now has the bit, the original cord and the flipped cord
      ?         if the bit is 1, use the original cord, else use the flipped one
    _           duplicate the array of cords
    2ew         get all pairs of adjacent cords
    {…}%        map each pair of cords
      ~\        dump the 2 cords on the stack and swap them
      W=        get the right plug of the first cord
      #         find its position in the second cord (if 0, we have a match)
    0-          remove all the zeros
    {…}&        if the array is not empty (i.e. we have a mismatch)
      ;         pop the array of cords
  ~             dump all the results for this permutation on the stack
                 (to avoid nested arrays)
1<              get the first result (if any) from the array of all results

Perhaps an explanation of how it works exactly?

@Timwi ok, I also golfed it a little more

This solution is invalid as it does not produce any output for the input (-] ]-> >-} }-) )-[ [-< <-{ {-(.

@R.Kap it does solve that input, but that particular online interpreter has a timeout (and is quite silent about it). You can try it here instead (and give it several minutes) or use the java interpreter (fastest)

In fact, the interpreter I linked above will probably take a long time to solve that input. The java interpreter solves it in less than 1.5 min on my computer.

JavaScript (ES6), 206
Recursive function
f=(l,a=l.pop(),x=x=>(z='<>[]{}()')[z.indexOf(x)^1])=>l[0]?l.some((b,i)=>r=[b,x([...b].pop())+b.slice(1,-1)+x(b[0])] .some(b=>r=a[0]==[...b].pop()?b+a:b[0]==[...a].pop()?a+b:0)&&(l=[...l],l[i]=r,f(l)))?r:'':a

More readable
f=(l,a=l.pop(),x=x=>(z='<>[]{}()')[z.indexOf(x)^1])=>
  l[0]?
  l.some((b,i)=>
     r=[b,x([...b].pop())+b.slice(1,-1)+x(b[0])]
     .some(b=>r=a[0]==[...b].pop()?b+a:b[0]==[...a].pop()?a+b:0)
     &&(l=[...l],l[i]=r,f(l))
    )?r:''
 :a

Test

f=(l,a=l.pop(),x=x=>(z='<>[]{}()')[z.indexOf(x)^1])=>l[0]?l.some((b,i)=>r=[b,x([...b].pop())+b.slice(1,-1)+x(b[0])] .some(b=>r=a[0]==[...b].pop()?b+a:b[0]==[...a].pop()?a+b:0)&&(l=[...l],l[i]=r,f(l)))?r:'':a

console.log=(...x)=>O.textContent+=x+'\n'

;[
 //OK
 ['[-->','{---]','>----{']
,['(-[','}--]']
,['(-)']
,['[--{']
,['[-]',']-[']
,['[----->',')------------[','{--<','}---)']
,['>-->','>->','>--->']
,['(-]',']->','>-}','}-)',')-[','[-<','<-{','{-(']
 //KO
,['[-->','{---]']
,['[-]','[-]']
,['(-]',']->','}-)']
,['>->','>-->',']---]']
,['[-------]',']-------[','[-------]','[---------]'] // shortened a little,
,['{--[',']--}']
].forEach(t=>{
  console.log(t+' : "'+f(t)+'"\n')
})

Javascript, 800 Bytes
Far from an optimized solution, but here's a quick hack together in javascript (no fancy ecma5 or anything, because I don't know it).

function a(r){function t(r,t){var n=r.slice();return n.splice(t,1),n}function n(r){var t,n={"[":"]","]":"[",">":"<","<":">","(":")",")":"(","{":"}","}":"{"},e=r.split("").reverse();for(t=0;t<e.length;t++)n.hasOwnProperty(e[t])&&(e[t]=n[e[t]]);return e.join("")}function e(r,t){return r.unshift(t),r}var h,u,f=[];if(1==r.length)return r[0];for(h=0;h<r.length;h++){var l=r[h],i=t(r,h),c=l.charAt(0),g=l.charAt(l.length-1);for(u=0;u<i.length;u++){var o=i[u],s=o.charAt(0),p=o.charAt(o.length-1);c==p&&f.push(e(t(i,u),o+l)),g==s&&f.push(e(t(i,u),l+o)),o=n(o),s=o.charAt(0),p=o.charAt(o.length-1),c==p&&f.push(e(t(i,u),o+l)),g==s&&f.push(e(t(i,u),l+o))}}if(f.length<1)return!1;for(h=0;h<f.length;h++){if(1===f[h].length)return f[h][0];f[h]=a(f[h])}for(h=0;h<f.length;h++)if(f[h]!==!1)return f[h];return!1}

Ungolfed, here it is... I'm sure at least 2 for loops are unnecessary here and that checking for a single element input at the top and a single element match at the bottom is stanky... but it seems to work and processes the test inputs.

function a(inputs)
{
 var i, ii, matches = [];
 if (inputs.length == 1) {
  return inputs[0];
 }
 // For each of the elements in inputs (e1)
 for (i = 0; i < inputs.length; i++) {
  var e1 = inputs[i],
   others = except(inputs,i),
   e1s = e1.charAt(0),
   e1e = e1.charAt(e1.length-1);
  // Compare to each of the other elements in inputs (e2)
  for (ii = 0; ii < others.length; ii++) {
   // get the start and end of the elements to compare (e1s,e1e,e2s,e2e)
   var e2 = others[ii],
    e2s = e2.charAt(0),
    e2e = e2.charAt(e2.length-1);
   // if any of them match up (e1s == e2e || e1s == e2s || e1e == e2s || e1e = e2e)
   // Make a new array of inputs containing the joined elements (as a single element) and all other elements which might join with them
   if (e1s == e2e) {
    matches.push(addTo(except(others,ii),e2+e1));
   }
   if (e1e == e2s) {
    matches.push(addTo(except(others,ii),e1+e2));
   }
   e2 = flip(e2);
   e2s = e2.charAt(0);
   e2e = e2.charAt(e2.length-1);
   if (e1s == e2e) {
    matches.push(addTo(except(others,ii),e2+e1));
   }
   if (e1e == e2s) {
    matches.push(addTo(except(others,ii),e1+e2));
   }
  }
 }

 if (matches.length < 1) {
  return false;
 }

 for (i = 0; i < matches.length; i++) {
  if (matches[i].length  === 1) {
   return matches[i][0];
  } else {
   matches[i] = a(matches[i]);
  }
 };

 for (i = 0; i < matches.length; i++) {
  if (matches[i] !== false) {
   return matches[i];
  }
 };

 return false;

 function except(list,idx)
 {
  var newList = list.slice();
  newList.splice(idx,1);
  return newList;
 }
 function flip(s) {
  var replacements = {
   '[':']',
   ']':'[',
   '>':'<',
   '<':'>',
   '(':')',
   ')':'(',
   '{':'}',
   '}':'{'
  }, i, a = s.split('').reverse();
  for (i = 0; i < a.length; i++) {
   if (replacements.hasOwnProperty(a[i])) {
    a[i] = replacements[a[i]];
   }
  }

  return a.join('');
 }
 function addTo(arr,newEl)
 {
  arr.unshift(newEl);
  return arr;
 }
}

You can rename the functions to save quite a few bytes. http://stackoverflow.com/questions/6156319/jquery-is-it-possible-to-rename-a-js-function

avoid .charAt in any version of JavaScript. s.charAt(x) === s[x]

Python 3, 217 bytes
from itertools import*
a='()[]{}<>'
all(any(c[-1]!=d[0]for c,d in zip(q,q[1:]))or print(''.join(q))for p in permutations(open(0))for q in product(*[(c[:-1],a[a.find(c[-2])^1]+c[-3:0:-1]+a[a.find(c[0])^1])for c in p]))

(Demo on Ideone)

How does this take input?

@R.Kap On stdin, one cord per line.

It does not seem to, at least when I ran it.

Also, how fast can it find the correct answer for `(-]
]->

-}
}-)
)-[
[-<
<-{
{-(`?

@R.Kap See the demo on Ideone for an example of it taking input and producing output. (It may not work on Windows, if that’s what you’re trying to do?) It runs ~instantly on your test case. There are of course cases that will take exponential time, though.

Python 3.5, 448 432 427 424 286 311 bytes:
(+25 since there was a bug where the output may be longer than it should be for some inputs)
def g3(z):
 B=z.split();M='i[::-1].translate({41:40,40:41,125:123,123:125,62:60,60:62,93:91,91:93})';f=B+[eval(M)for i in B if eval(M)not in B];d=[f.pop(0)]
 for h in d:
  try:[d.append([f.pop(f.index(c))for c in f if h[-1]==c[0]][0])if len(d)<len(B)else E]
  except:break
 return''.join(d)if len(d)>=len(B)else''

Works perfectly! except for inputs with 7 or more values. It takes a long time for those, most likely because it must go through all those permutations of the input plus the input reversed. I will try to fix this if and when I can, but for now, this seems to be good enough. All is good now! If only I could somehow use that try-except block in list comprehension, it could be a little shorter, and look much nicer. Nonetheless, it now works for all the test cases, and, best of all, it uses no imports! :)
Try it online! (Ideone) (284 bytes here)
(Tip: To try it, just select "fork", and then input your choices, space-separated, and select "run")
Explanation
Basically, what's happening is...

A list, B, is created from the input by splitting it at the whitespace into its component "cords".
M is a string I created which, when evaluated, returns a list based on B which contains all the cords, but this time backwards.
The list created from M is ultimately concatenated with B itself to create a list, f, with all possible orientations of the "cords".
Another list, d is created, which will be initialized with the first value (value f[0]) of f.
Finally, all the values in d are iterated through, and each value's last character is compared with the first character of each element in f, and when a match is found, that character is popped (or removed) and returned from list f. This happens until a IndexError is raised, or the length of list d exceeds B and a NameError is raised after the call to E,both of which are handled, and then list d's contents are joined into a string and returned as long as the length of list d is more than or equal to the length of list B. Otherwise, an empty string is returned (''), since d not being the same length as B signifies that all the "cords" in list B cannot be joined into one long "cord".

@KennyLau What did you change? From what I can see, you just added .What does that change?

That can enable syntax highlighting for your code.

@KennyLau Wow, that's cool. I was wondering how I would do that on PPCG. Now I know! Thank you! :)

Lua, 477 bytes
function r(s)return s:reverse():gsub("[()%[%]{}<>]",{["("]=")",[")"]="(",["["]="]",["]"]="[",["{"]="}",["}"]="{",["<"]=">",[">"]="<"})end
function a(c,b)for i, v in next,b do
m=c:sub(-1,-1)n=v:sub(1,1)o=r(c):sub(-1,-1)p=r(v):sub(1,1)l=table.remove(b,i)if m==n then
return a(c..v,b)elseif o==n then
return a(r(c)..v,b)elseif m==p then
return a(c..r(v),b)elseif o==p then
return a(r(c)..r(v),b)end
table.insert(b,i,l)end
return#b>0 and""or c
end
print(a(table.remove(arg,1),arg))

Accepts cords as command line arguments

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Hilbert Primes Golf
Hilbert numbers are defined as positive integers of the form 4n + 1 for n >= 0. The first few Hilbert numbers are:
1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97

The Hilbert number sequence is given by OEIS sequence A016813.
A related number sequence, the Hilbert primes, are defined as the Hilbert numbers H > 1 that are not divisible by any Hilbert number k such that 1 < k < H. The first few Hilbert primes are:
5, 9, 13, 17, 21, 29, 33, 37, 41, 49, 53, 57, 61, 69, 73, 77, 89, 93, 97, 101, 109, 113, 121, 129, 133, 137, 141, 149, 157, 161, 173, 177, 181, 193, 197

Naturally, OEIS has this sequence too.
Given a integer n such that 0 <= n <= 2^16 as input, output the nth Hilbert prime.
This is code-golf, so standard rules apply, and the shortest code in bytes wins.
Leaderboard
The Stack Snippet at the bottom of this post generates the leaderboard from the answers a) as a list of shortest solution per language and b) as an overall leaderboard.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
## Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:
## Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:
## Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the snippet:
## [><>](http://esolangs.org/wiki/Fish), 121 bytes

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Shortest Solution by Language

Language	User	Score

Leaderboard

	Author	Language	Size

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

I think you mean "not divisible by" instead of "relatively prime with". 21 and 9 share a common factor of 3.

Pyth, 21 bytes
Lh*4bye.fqZf!%yZyT1hQ

Try it online: Demonstration or Test Suite
Explanation:
Lh*4bye.fqZf!%yZyT1Q    implicit: Q = input number
L                       define a function y(b), which returns
 h*4b                      4*b + 1
                        this converts a index to its Hilbert number
       .f          hQ   find the first (Q+1) numbers Z >= 1, which satisfy:
           f      1        find the first number T >= 1, which satisfies:
            !%yZyT            y(Z) mod y(T) == 0
         qZ                test if the result is equal to Z

                        this gives a list of indices of the first Q Hilbert Primes
      e                 take the last index
     y                  apply y and print

Haskell, 46 bytes
(foldr(\a b->a:[x|x<-b,mod x a>0])[][5,9..]!!)

An anonymous function.
The core is foldr(\a b->a:[x|x<-b,mod x a>0])[][5,9..], which iterates through the arithmetic progression 5,9,13,..., removing multiples of each one from the list to its right. This produces the infinite list of Hilbert primes. Then, !! takes the nth element.
I has tried making (\a b->a:[x|x<-b,mod x a>0]) pointfree but didn't find a shorter way.

Turning the foldr into another list comprehension saves two byes: ([x|x<-[5,9..],all((>0).mod x)[5,9..x-1]]!!)

@nimi Nice solution. You should post that, it's a different method. I'm sad it's shorter though because it's more direct to the definition and the repetition of the list is less pretty.

CJam, 36 33 32 23 bytes
5ri{_L+:L;{4+_Lf%0&}g}*

Try it online
The latest version is actually much more @MartinBüttner's than mine. The key idea in his suggested solution is to use two nested loops to find the n-th value that meets the condition. I thought I was being clever by using only a single loop in my original solution, but it turns out that the added logic cost more than I saved by not using a second loop.
Explanation
5       Push first Hilbert prime.
ri      Get input n and convert to integer.
{       Loop n times.
  _       Push a copy of current Hilbert prime.
  L       Push list of Hilbert primes found so far (L defaults to empty list).
  +       Prepend current Hilbert prime to list.
  :L      Store new list of Hilbert primes in variable L.
  ;       Pop list off stack.
  {       Start while loop for finding next Hilbert prime.
    4+      Add 4 to get next Hilbert number.
    _       Copy candidate Hilbert number.
    L       Push list of Hilbert primes found so far.
    f%      Element wise modulo of Hilbert number with smaller Hilbert primes.
    0&      Check for 0 in list of modulo values.
  }g      End while loop.
}*      End loop n times.

Husk, 8 bytes
!ü¦¡+4 5

Try it online!
Uses 1-based indexing.
Explanation
!ü¦¡+4 5   Implicit input n.
   ¡       Iterate
    +4     addition of 4
       5   starting from 5: [5,9,13,17,..]
 ü         Uniquify by
  ¦        divisibility.
!          Get nth element.

Most of the work is done by ü¦.
The function ü, when given a binary function f and a list, greedily constructs a subsequence where f x y is falsy for every (not necessarily adjacent) pair of elements x, y.
In this case it picks a number if it's not divisible by any earlier pick.
Then we just index into the resulting infinite list.

Minkolang 0.14, 46 37 32 bytes
I didn't realize that the gosub was totally unnecessary... >_>
n$z(xxi4*5+d(4-$d%)1=,z+$ziz-)N.

Try it here and check all test cases here.
Explanation
n$z                                 Take number from input and store it in the register
   (                                Open while loop
    xx                              Dump the stack
      i4*5+                         Loop counter times 4 plus 5 (Hilbert number)
           d                        Duplicate
            (                       Open while loop
             4-                     Subtract 4
               $d                   Duplicate stack
                 %                  Modulo
                  )                 Exit while loop when top of stack is 0
                   1=,              0 if 1, 1 otherwise
                      z             Push register value
                       +            Add
                        $z          Pop and store in register
                          iz-       Subtract z from loop counter
                             )      Exit while loop when top of stack is 0
                              N.    Output as number and stop.

The register is used to store the target index. The outer while loop calculates each Hilbert number and does some bookkeeping. The inner while loop checks each Hilbert number for primality. If a Hilbert number is not a Hilbert prime, then the target is incremented so that the outer while loop has to repeat (at least) one more time, effectively skipping Hilbert composites.

Mathematica, 65 bytes
Select[4Range[4^9]+1,Divisors[#][[2;;-2]]~Mod~4~FreeQ~1&][[#+1]]&

Generates the entire list and selects the element from it.

Raku, 35 bytes
grep {$_%%none 5,9...^$_},(5,9...*)

Try it online!
This is an expression for the lazy, infinite list of Hilbert primes.

5, 9 ... * is the infinite list of Hilbert numbers.  (Raku infers that it's an arithmetic sequence from the first two elements.)
grep { $_ %% none 5, 9 ...^ $_ } filters that list to those which are divisible (%%) by none of the Hilbert numbers up to, but not including (...^), the number being tested.

Ruby, 60 bytes
h=->i{n=[];x=5;n.any?{|r|x%r<1}?x+=4: n<<x until e=n[i-1];e}

Only checks Hilbert prime factors.

Matlab, 74 83 bytes
function t=H(n)
x=5;t=x;while nnz(x)<n
t=t+4;x=[x t(1:+all(mod(t,x)))];end

Thanks to Tom Carpenter for removing 9 bytes!
Example use:
>> H(20)
ans =
   101

@TomCarpenter Thanks! Now this answer is more yours than mine :-)

You're welcome :). It's still your logic, just applied a few tricks I've learnt along the way.

Julia, 73 bytes
n->(a=[x=5];while length(a)<n;x+=4;all(k->mod(x,k)>0,a)&&push!(a,x)end;x)

Thanks Alex A. for saving 11 bytes! This uses the same algorithm as the Matlab and Ruby answers. Since Julia arrays are one-indexed, this starts with f(1) == 5.
My first attempt, using the Lazy package, is 106 bytes. If you plan to run this in the REPL, make sure to add semicolons to the ends of the lines to suppress the infinite output. And call Pkg.Add("Lazy") if you don't already have it installed.
using Lazy
r=range
h=r(1,Inf,4)
p=@>>r() filter(n->n!=1&&all(map(x->mod(h[n],h[x])<1,2:n-1)))
f=n->h[p[n]]

73 bytes: n->(a=[x=5];while length(a)<n x+=4;all(k->mod(x,k)>0,a)&&push!(a,x)end;x)

You can save some more by using endof instead of length and x%k instead of mod(x,k).

JavaScript (ES6), 73 bytes
n=>{for(i=0,t=2;i<=n;)i+=!/^(.(....)+)\1+$/.test(Array(t+=4));return t-1}

Just check Hilbert numbers one by one until we reach the nth Hilbert prime. Divisibility by Hilbert number is handled by regex.

Jelly, 17 15 bytes
ŻḤḤ‘ḍḍiɗċ1=2µ#Ṫ

Try it online!
Uses 1-indexing (e.g. 1 -> 5, 2 -> 9, etc.), allowed by default on sequence challenges.
How it works
ŻḤḤ‘ḍḍiɗċ1=2µ#Ṫ - Main link. Takes n via STDIN
            µ#  - Execute the following on integers k = 1, 2, 3, ... until n integers return True:
Ż               -   Yield [0, 1, 2, ..., k]
 Ḥ              -   Unhalve; [0, 2, 4, ..., 2k]
  Ḥ             -   Unhalve; [0, 4, 8, ..., 4k]
   ‘            -   Increment; [1, 5, 9, ..., 4k+1]
       ɗ        -   Group the previous three links into a dyad.
                    Use l = [1, 5, ..., 4k+1] on the left and k on the right:
    ḍ           -     Each element in l is divisible by k?
      i         -     Index of k in l or 0?
     ḍ          -     1 or 0 is divisible by the index?
                    This yields a list with 2 1s for Hilbert primes
        ċ1      -   Count 1s
          =2    -   Equals 2?
              Ṫ - Take the last one i.e. the nth Hilbert prime

Perl 5 -p, 56 bytes
$k=$.+=4;1while($k-=4)>1&&$.%$k;($k>1||--$_)&&redo;$_=$.

Try it online!

JavaScript, 59 58 54 bytes
0-indexed and based on the (possibly erroneous?) observation that, just as all composite numbers are divisible by at least one prime, all Hilbert composites are also divisible by at least one Hilbert prime.
Here's a limited proof of that using the first 20000 Hilbert numbers.
We handle the edge case of 1 being neither prime nor composite below by hardcoding 5 as our stating point.
a=[x=5];f=n=>a[a.every(y=>x%y,x+=4)?a.push(x):n]||f(n)

Try it online!
Explanation
We initialise an array a=[5], which will hold the Hilbert primes, and an integer x=5, which we'll use as a temporary variable for the Hilbert numbers, outside the main function. Usually this wouldn't be possible because our rules require that everything be reusable by successive function calls, but here on each successive call of the function a[n] will either exist and be immediately returned or we'll resume building the array of primes from where we left off on the last call and continue until it does exist.
f, then, is our recursive function taking input via parameter n. On each iteration we increment x by 4 and then check that, for each existing prime y in a, x%y>0.
If it is then we push the new value of x to a, which returns the updated length of a. We use that to index into a but, as JavaScript uses 0-based indexing, a[a.length] will always return undefined, which is falsey, so we fall through the logical OR to execute a recursive call to f(n) and continue to do so until we encounter a Hilbert composite (i.e., for at least one y in a, x%y===0).
When we do encounter a composite we instead index n into a and, if it exists, return that value, or continue recursing until the next composite if it doesn't.

Python, 80 bytes
f=lambda I,i=0,H=[2]:(i>I)*H[0]or f(I,i+all((p:=4*len(H)+1)%h for h in H),[p]+H)

Attempt This Online!
0-indexed (but it would be trivial to change to be 1-indexed). Stores the previous Hilbert numbers in H, and stores how many Hilbert  primes have been found so far in i.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Partition into increasing subsequences
Specification
This challenge is simple to state: your input is a non-empty array of nonnegative integers, and your task is to partition it into as few increasing subsequences as possible.
More formally, if the input array is A, then the output is an array of arrays B such that:

Each arrays in B form a partition of A into disjoint (not necessarily contiguous) subsequences. Inductively, this means that either B is the singleton array containing A, or the first element of B is a subsequence of A and the rest form a partition of A with that subsequence removed.
Every array in B is (not necessarily strictly) increasing.
The number of arrays in B is minimal.

Both the input and output can be taken in the native array format of your language.
Note that there may be several correct outputs.
Example
Consider the input array A = [1,2,1,2,5,4,7,1].
One possible output is B = [[1],[1,2,4,7],[1,2,5]].
The partition condition is evident from this diagram:
A    1 2 1 2 5 4 7 1
B[0]               1
B[1] 1 2       4 7
B[2]     1 2 5

Also, each array in B is increasing.
Finally, A can't be split into two increasing subsequences, so the length of B is also minimal.
Thus it's a valid output.
Rules and scoring
You can write a function or a full program.
The lowest byte count wins, and standard loopholes are disallowed.
There is no time bound, but you should evauate your solution on all test cases before submitting it.
Test cases
Only one possible output is shown, but there may be several valid options.
In particular, the order of the arrays in the result doesn't matter (but each individual array should be in increasing order).
[0] -> [[0]]
[3,5,8] -> [[3,5,8]]
[2,2,2,2] -> [[2,2,2,2]]
[1154,1012,976,845] -> [[845],[976],[1012],[1154]]
[6,32,1,2,34,8] -> [[1,2,8],[6,32,34]]
[1,12,1,12,1,13] -> [[1,1,1,13],[12,12]]
[6,4,6,13,18,0,3] -> [[0,3],[4,6,13,18],[6]]
[1,2,3,2,3,4,7,1] -> [[1,1],[2,2,3,4,7],[3]]
[0,9,2,7,4,5,6,3,8] -> [[0,2,3,8],[4,5,6],[7],[9]]
[7,1,17,15,17,2,15,1,6] -> [[1,1,6],[2,15],[7,15,17],[17]]
[4,12,2,10,15,2,2,19,16,12] -> [[2,2,2,12],[4,10,15,16],[12,19]]
[10,13,9,2,11,1,10,17,19,1] -> [[1,1],[2,10,17,19],[9,11],[10,13]]
[3,7,3,8,14,16,19,15,16,2] -> [[2],[3,3,8,14,15,16],[7,16,19]]
[15,5,13,13,15,9,4,2,2,17] -> [[2,2,17],[4],[5,9],[13,13,15],[15]]

The rules seem to allow solutions like [0,5,2,0] -> [[0,5],[0,2]] (i.e., recycling the first zero instead of using each of them once). Is that intentional?

@feersum That wasn't intentional, good catch. I've rewritten the conditions for B, hopefully they're clearer now.

Haskell, 54 bytes
n#[]=[[n]]
n#(l:c)|[n]<=l=(n:l):c|1<2=l:n#c
foldr(#)[]

Usage example: foldr(#)[] [4,12,2,10,15,2,2,19,16,12]-> [[2,2,2,12],[4,10,15,16],[12,19]]
How it works: go through the input list starting at the right end. Build the output list (of lists) by prepending the current element n to first sublist l where n is less or equal to the head of l. If there's none, make a new singleton list of n at the end of the output list.

Pyth, 20 bytes
fTu&ahfSI+THGHGQm[)Q

Try it online: Demonstration or Test Suite
Greedy approach. I create len(input) empty lists. Then I iterate over each number in the input an choose the first list, which is still sorted after appending the number.
Explanation:
fTu&ahfSI+THGHGQm[)Q   implicit: Q = input list
                m[)Q   create a list of empty lists and assign to G
  u            Q       iterate over all numbers H in input:
      f     G             filter for lists T in G, which satisfy:
         +TH                 create a new list out of T and H
       SI                    and check if it is sorted
     h                    take the first such list T
    a        H            and append H
   &          G           logical and with G (so that u doesn't overwrite G)
fT                     remove all empty lists

@ThomasKwa Tested quite a lot of additional test-cases now. Couldn't find a single one, that gives the wrong result. I'm quite sure, that Greedy always returns the correct result.

@ThomasKwa Oh, that counterexample was to a different greedy strategy (find the longest increasing subsequence, remove it and recurse). I also can't seem to find a test case for which this submission fails...

Well, I think the burden is on the answerer to prove it works. I'll upvote if this is proven valid.