diff options
| -rw-r--r-- | c.html.markdown | 4 | ||||
| -rw-r--r-- | erlang.html.markdown | 2 | ||||
| -rw-r--r-- | fr-fr/go-fr.html.markdown | 1 | ||||
| -rw-r--r-- | haskell.html.markdown | 15 | ||||
| -rw-r--r-- | perl6.html.markdown | 6 | ||||
| -rw-r--r-- | pt-br/brainfuck-pt.html.markdown | 2 | ||||
| -rw-r--r-- | pt-br/git-pt.html.markdown | 2 | ||||
| -rw-r--r-- | ru-ru/javascript-ru.html.markdown | 4 | ||||
| -rw-r--r-- | ru-ru/python3-ru.html.markdown | 2 | 
9 files changed, 21 insertions, 17 deletions
diff --git a/c.html.markdown b/c.html.markdown index 1696d28f..d3f20eda 100644 --- a/c.html.markdown +++ b/c.html.markdown @@ -234,7 +234,7 @@ int main() {    // same with j-- and --j    // Bitwise operators! -  ~0x0F; // => 0xF0 (bitwise negation, "1's complement") +  ~0x0F; // => 0xFFFFFFF0 (bitwise negation, "1's complement", example result for 32-bit int)    0x0F & 0xF0; // => 0x00 (bitwise AND)    0x0F | 0xF0; // => 0xFF (bitwise OR)    0x04 ^ 0x0F; // => 0x0B (bitwise XOR) @@ -242,7 +242,7 @@ int main() {    0x02 >> 1; // => 0x01 (bitwise right shift (by 1))    // Be careful when shifting signed integers - the following are undefined: -  // - shifting into the sign bit of a signed integer (int a = 1 << 32) +  // - shifting into the sign bit of a signed integer (int a = 1 << 31)    // - left-shifting a negative number (int a = -1 << 2)    // - shifting by an offset which is >= the width of the type of the LHS:    //   int a = 1 << 32; // UB if int is 32 bits wide diff --git a/erlang.html.markdown b/erlang.html.markdown index 04086aeb..a7390c3e 100644 --- a/erlang.html.markdown +++ b/erlang.html.markdown @@ -206,7 +206,7 @@ max(X, Y) ->    if      X > Y -> X;      X < Y -> Y; -    true -> nil; +    true -> nil    end.  % Warning: at least one of the guards in the `if` expression must evaluate to true; diff --git a/fr-fr/go-fr.html.markdown b/fr-fr/go-fr.html.markdown index 2ff5902f..16558e7e 100644 --- a/fr-fr/go-fr.html.markdown +++ b/fr-fr/go-fr.html.markdown @@ -2,6 +2,7 @@  name: Go  category: language  language: Go +lang: fr-fr  filename: learngo.go  contributors:      - ["Sonia Keys", "https://github.com/soniakeys"] diff --git a/haskell.html.markdown b/haskell.html.markdown index 2f807c5f..f28fcfe7 100644 --- a/haskell.html.markdown +++ b/haskell.html.markdown @@ -202,19 +202,20 @@ foo = (*5) . (+10)  foo 5 -- 75  -- fixing precedence --- Haskell has another function called `$`. This changes the precedence --- so that everything to the left of it gets computed first and then applied --- to everything on the right. You can use `$` (often in combination with `.`) --- to get rid of a lot of parentheses: +-- Haskell has another operator called `$`. This operator applies a function  +-- to a given parameter. In contrast to standard function application, which  +-- has highest possible priority of 10 and is left-associative, the `$` operator  +-- has priority of 0 and is right-associative. Such a low priority means that +-- the expression on its right is applied as the parameter to the function on its left.  -- before -(even (fib 7)) -- true +(even (fib 7)) -- false  -- after -even . fib $ 7 -- true +even . fib $ 7 -- false  -- equivalently -even $ fib 7 -- true +even $ fib 7 -- false  ----------------------------------------------------  -- 5. Type signatures diff --git a/perl6.html.markdown b/perl6.html.markdown index 1b320028..8404f9f8 100644 --- a/perl6.html.markdown +++ b/perl6.html.markdown @@ -253,7 +253,9 @@ given "foo bar" {    when $_.chars > 50 { # smart matching anything with True (`$a ~~ True`) is True,                         # so you can also put "normal" conditionals.                         # This when is equivalent to this `if`: -                       #  if ($_.chars > 50) ~~ True {...} +                       #  if $_ ~~ ($_.chars > 50) {...} +                       # Which means: +                       #  if $_.chars > 50 {...}      say "Quite a long string !";    }    default { # same as `when *` (using the Whatever Star) @@ -560,7 +562,7 @@ subset VeryBigInteger of Int where * > 500;  multi sub sayit(Int $n) { # note the `multi` keyword here    say "Number: $n";  } -multi sayit(Str $s) } # a multi is a `sub` by default +multi sayit(Str $s) { # a multi is a `sub` by default    say "String: $s";  }  sayit("foo"); # prints "String: foo" diff --git a/pt-br/brainfuck-pt.html.markdown b/pt-br/brainfuck-pt.html.markdown index 72c2cf6e..c7ce55ee 100644 --- a/pt-br/brainfuck-pt.html.markdown +++ b/pt-br/brainfuck-pt.html.markdown @@ -5,7 +5,7 @@ contributors:      - ["Mathias Bynens", "http://mathiasbynens.be/"]  translators:      - ["Suzane Sant Ana", "http://github.com/suuuzi"] -lang: pt-pt +lang: pt-br  ---  Brainfuck (em letras minúsculas, eceto no início de frases) é uma linguagem de diff --git a/pt-br/git-pt.html.markdown b/pt-br/git-pt.html.markdown index b8cbd0a9..981da503 100644 --- a/pt-br/git-pt.html.markdown +++ b/pt-br/git-pt.html.markdown @@ -1,7 +1,7 @@  ---  category: tool  tool: git -lang: pt-pt +lang: pt-br  filename: LearnGit.txt  contributors:      - ["Jake Prather", "http://github.com/JakeHP"] diff --git a/ru-ru/javascript-ru.html.markdown b/ru-ru/javascript-ru.html.markdown index e7398c88..79844565 100644 --- a/ru-ru/javascript-ru.html.markdown +++ b/ru-ru/javascript-ru.html.markdown @@ -22,8 +22,8 @@ Google Chrome, становится все более популярной.  ```js  // Си-подобные комментарии. Однострочные комментарии начинаются с двух символов слэш, -/* а многострочные комментарии начинаются с звёздочка-слэш -   и заканчиваются символами слэш-звёздочка */ +/* а многострочные комментарии начинаются с последовательности слэш-звёздочка +   и заканчиваются символами звёздочка-слэш */  // Инструкции могут заканчиваться точкой с запятой ;  doStuff(); diff --git a/ru-ru/python3-ru.html.markdown b/ru-ru/python3-ru.html.markdown index fd95c876..2a7b3f7b 100644 --- a/ru-ru/python3-ru.html.markdown +++ b/ru-ru/python3-ru.html.markdown @@ -593,7 +593,7 @@ def double_numbers(iterable):  range_ = range(1, 900000000)  # Будет удваивать все числа, пока результат не превысит 30 -for i in double_numbers(xrange_): +for i in double_numbers(range_):      print(i)      if i >= 30:          break  | 
