본문 바로가기

전체 글

[프로그래밍 언어/ Racket] check_bst.rkt , apply.rkt, equals.rkt - Programming Language #lang racket (provide (all-defined-out)) (define (node_value node) (car node)) (define (node_left_child node) (cadr node)) (define (node_right_child node) (caddr node)) (define (check_bst ROOT) (if (null? ROOT) #t (letrec ([value (node_value ROOT)] [check_right_child_value (lambda(node) (if (null? node) #t (< value (node_value node))))] [check_left_child_value (lambda(node) (if (null? node) #t (.. 더보기
[프로그래밍언어/ML] ML Modules - 컴도리돌이 2020/06/15 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍언어/ML] pairs, lists, local bindings, benefit of no mutation - 컴도리돌이-(1) 2020/06/15 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어/ ML] Records, Datatypes, Case Expressions and more - 컴도리돌이-(2) 2020/06/15 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어론/ ML] Nested Patterns Exceptions tail Recursion -컴도리돌이-(3) 2020/06/16 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍언어/ML] ML Modules - 컴도리돌이-(4.. 더보기
[프로그래밍 언어론/ ML] Nested Patterns Exceptions tail Recursion -컴도리돌이 2020/06/16 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어/ SML] Records, Datatypes, Case Expressions and more - 컴도리돌이-(2) 2020/06/15 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍언어/ML] pairs, lists, local bindings, benefit of no mutation - 컴도리돌이-(1) Pattern Matching fun eval e = case e of Constant i => i | Negate e2 => ~ (eval e2) | Add(e1,e2) => (eval e1) + (eval e2) | Multiply(e1,e2) => (eval e1) * (eval e2) fun eval(C.. 더보기
[프로그래밍 언어/ ML] Records, Datatypes, Case Expressions and more - 컴도리돌이 2020/06/15 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍언어/ML] pairs, lists, local bindings, benefit of no mutation - 컴도리돌이-(1) Records Records는 label이 부착된 이기종 요소(heterogeneous)의 구조화된 데이터 유형이다. label은 요소들을 어떤 순서로도 작성할 수 있도록 한다. {f1 = e1,..., fn = en} (*Record 값에는 필드(모든 이름) 고정 값이 있음*) {name = "Amelia", id = 41123 - 12} {id : int, name : string} - {abscissa=1.2, ordinate=3.2}; val it = {abscissa=1.2,ordinate=3... 더보기
[프로그래밍언어/ML] pairs, lists, local bindings, benefit of no mutation - 컴도리돌이 Function bindings ML 언어에서 함수를 구현할 때 기본적으로 3가지를 확인을 해야 한다. - Syntax - Evalutation - Type-checking (*기본적인 형태*) fun x0 (x1 : t1, ... , xn : tn) = e (*example*) fun apply_f( f: int * int -> int, x : int, y:int ) = ... syntax : fun apply_f( f : int * int -> int, x : int, y : int) = -> Debugging Errors : 의도한 구성이 틀렸거나, 구성을 하지 않았거나 evalutation : apply_f 함수는 매개 변수로 x, y의 값을 받아 온다. -> Debugging Errors : 디.. 더보기
[프로그래밍 언어/Racket] Datatype-Style Programming with Lists or Structs and more - 컴도리돌이 2020/05/21 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어/Racket] Racket introduction - 컴도리돌이-(1) 2020/05/28 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어/Racket] Thunks, Laziness, Streams, Memoization -컴도리돌이-(2) 2020/06/04 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍언어/Racket] Macros - 컴도리돌이-(3) 2020/06/11 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어/Racket] Datatype-Style Programming with Lists or Structs and more - 컴도리돌이-(4) Struct (stru.. 더보기
[프로그래밍언어/Racket] Macros - 컴도리돌이 2020/05/21 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어/Racket] Racket introduction - 컴도리돌이-(1) 2020/05/28 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어/Racket] Thunks, Laziness, Streams, Memoization -컴도리돌이-(2) 2020/06/04 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍언어/Racket] Macros - 컴도리돌이-(3) 2020/06/11 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어/Racket] Datatype-Style Programming with Lists or Structs and more - 컴도리돌이-(4) macro 매크로(ma.. 더보기
[프로그래밍 언어/Racket] Thunks, Laziness, Streams, Memoization -컴도리돌이 2020/05/21 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어/Racket] Racket introduction - 컴도리돌이 -(1) 2020/05/28 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어/Racket] Thunks, Laziness, Streams, Memoization -컴도리돌이-(2) 2020/06/04 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍언어/Racket] Macros - 컴도리돌이-(3) 2020/06/11 - [컴퓨터 전공 공부/프로그래밍언어론] - [프로그래밍 언어/Racket] Datatype-Style Programming with Lists or Structs and more - 컴도리돌이-(4) Thunks 매개변수.. 더보기

728x90