Thank you for your comment

Beau­tiful Racket / racket school 2019

  1. test.rkt
    var obj = {
        'dbl' : function(x) { x + x; }
    };
    obj.dbl; // #<procedure:...test.rkt:3:12>
    1
    2
    3
    4
    var obj = {
        'dbl' : function(x) { x + x; }
    };
    obj.dbl; // #<procedure:...test.rkt:3:12>
    
    copy to clipboard
  2. var eq = function (x, y) {
      if ( x == y ) {
         return "yes";
      } else {
         return "no";
      }
    };

    eq(4, 4); // "yes"
    eq(4, 2); // "no"
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    var eq = function (x, y) {
      if ( x == y ) {
         return "yes";
      } else {
         return "no";
      }
    };
    
    eq(4, 4); // "yes"
    eq(4, 2); // "no"
    
    copy to clipboard
← prev next →