Notation refers to a specific way of writing various concepts, functions, etc. Usually it is introduced to abbreviate complicated expressions and make common idioms more readable.
Questions tagged [notation]
633 questions
11
votes
1 answer
What's this "function a/<()" in the developer console?
While playing with the Developer Console in Firefox, I tried doing this:
var a = b => c => c;
and then this:
a(1)
I expected the result to be function() (corresponding to c => c), but this was displayed instead:
function a/<()
What is the meaning…

Giulio Muscarello
- 1,312
- 2
- 12
- 33
11
votes
4 answers
python SyntaxError with dict(1=...), but {1:...} works
Python seems to have an inconsistency in what kind of keys it will accept for dicts. Or, put another way, it allows certain kinds of keys in one way of defining dicts, but not in others:
>>> d = {1:"one",2:2}
>>> d[1]
'one'
>>> e =…

abalter
- 9,663
- 17
- 90
- 145
10
votes
1 answer
What do bracketed double dots mean in Haskell?
I understand that .. can be used in ranges--i.e., [1..3] == [1,2,3], and [10..] is an infinite list starting at 10.
However, recently I've started seeing these double dots inside brackets too. Either as (..) or {..}.
For example, an import statement…

lantejoula
- 171
- 5
10
votes
1 answer
custom postfix notation, Apply / Function
I would like to set up the following custom notation in Mathematica 7.
This notation is not particularly useful in itself, so please do not suggest existing alternatives, or point out that this only saves a few keystrokes.
I want to know if and how…

Mr.Wizard
- 24,179
- 5
- 44
- 125
10
votes
2 answers
Differences between [in, out] and [out, retval] in COM IDL definitions
In some of the IDL I work with I have noticed that there are 2 conventions for marking return values in methods - [in, out] and [out, retval].
It appears that [in, out] is used when there are multiple return values, for example:
HRESULT MyMethod(
…

LeopardSkinPillBoxHat
- 28,915
- 15
- 75
- 111
9
votes
2 answers
What is ((->) t ) in haskell?
I am doing 20 intermediate Haskell exercises.
After finishing first 2 exercise there is this strange thing.
I would like to know what is ((->) t)?
-- Exercise 3
-- Relative Difficulty: 5
instance Fluffy ((->) t) where
furry = error…

Pratik Deoghare
- 35,497
- 30
- 100
- 146
9
votes
2 answers
How can I convert between scientific and decimal notation in Perl?
I know this is a total newbie question, but the answer may not be obvious to many new programmers. It wasn't initially obvious to me so I scoured the Internet looking for Perl modules to do this simple task.

Kurt W. Leucht
- 4,725
- 8
- 33
- 45
9
votes
1 answer
Binary Numbers and Representation of Bases
So, binary is just base 2, right? 1s and 0s. But why, when you convert from dec to bin, on Google for example, does it also have an (x)b in front of the actual number? What does the, for example, 0b __ mean?

Aristides
- 3,805
- 7
- 34
- 41
8
votes
3 answers
Compact MATLAB matrix indexing notation
I've got an n-by-k sized matrix, containing k numbers per row. I want to use these k numbers as indexes into a k-dimensional matrix. Is there any compact way of doing so in MATLAB or must I use a for loop?
This is what I want to do (in MATLAB pseudo…

AnnaR
- 3,166
- 6
- 35
- 39
8
votes
3 answers
Why is this code considered O(N^6) in Big Oh notation?
I was just reading another question and this code intrigued me:
for(i = 0; i < n; i++)
{
for(j = 0; j < i*i; j++)
{
for(k = 0; k < i*j; k++)
{
pseudo_inner_count++;
for(l = 0; l < 10; l++);
}
…

karlphillip
- 92,053
- 36
- 243
- 426
8
votes
5 answers
C# notation understanding Select(int.Parse)
I found a little script that I understand fully. I've got a string with "1 -2 5 40" for example. It reads the input string, splits it into a temporary array. Then this array is parsed and each element is transformed into an integer. The whole thing…

Angecroft
- 81
- 1
- 3
8
votes
4 answers
Haskell - Redefining (hiding) arithmetic operators
I want to redefine several arithmetic operators in Haskell in order to make them more extensible and generic.
E.g.
class Mul a b c | a b -> c where
(*) :: a -> b -> c
This seems to work in combination with
import Prelude hiding ((*))
hiding…

Dario
- 48,658
- 8
- 97
- 130
8
votes
1 answer
Why use * notation to both define a pointer and dereference one?
Is there a reason the language designers of c used the star for both defining a pointer type
int* x;
and dereferencing a pointer?
int y = *x;
Using the same character for two different things seems confusing, especially since they're always used…

user2977618
- 83
- 4
8
votes
2 answers
Muscial notation on the iPhone. Any suggestions for example code?
I'm writing an iPhone app where I'd like to display some simple musical notation (just a chord or two).
This question is a call for suggestions on the quickest way to go about it. For instance:
Is there any iphone OR objective-C libraries for doing…

Nate Murray
- 3,841
- 5
- 32
- 33
8
votes
1 answer
Ruby trying to grasp a new notation. (inject(: ) vs select(&:even?); why one has &?)
So, I've just learned that instead of writing things like:
[1,2,3,4,5].inject {|x,y| x + y} => 15
I could write
[1,2,3,4,5].inject(:+) => 15
I also learned that instead of writing
[1,2,3,4,5].select {|x| x.even?} => [2,4]
I could…

David
- 7,028
- 10
- 48
- 95