ios개발/함수형 프로그래밍 12

<java> 자바 MVVM 사용하는 방법. swing

[book.interpark.com/product/BookDisplay.do?_method=detail&sc.prdNo=268649098&gclid=Cj0KCQiA88X_BRDUARIsACVMYD_EgPJiBYn7QGOpnAAB5PG4enQ4GLG4LNBz3DquMUEsDIbyhEeZ6WYaAgC1EALw_wcB] 이 책을 보는데 import javax.swing.*; import java.awt.FlowLayout; import swidgets.*; import nz.sodium.*; public class clearfield { public static void main(String[] args) { JFrame frame = new JFrame("clearfield"); frame.setDefaul..

<함수형 프로그래밍> 리스너 콜백?

FRP 입문자를 위한 종합 안내서, 스티븐 블랙히스, 앤서니 존스 지음의 책을 읽는 중이다. 책 초반에, "모든 FRP 시스템이 내부적으로 리스너를 사용하지 않는다"는 문구가 있는데, 리스너랑 콜백이 무엇인지 알아보려 한다. [onlyfor-me-blog.tistory.com/47] 이분이 이미 조사를 많이 하셨다... 위 분의 결론 : - 콜백 메서드는 다른 함수에 인수로 넣을 수 있는 메서드고, 보통 on으로 시작하는 것들이 콜백 함수다. 버튼 클릭 등 이벤트가 발생하면 이에 맞는 작업을 수행하기 위해 코드를 작성하는 곳이다. - 리스너는 특정 이벤트를 처리하는 인터페이스로, 추상 메서드인 onTouch()를 받아서 실행하며 이벤트 핸들러라고도 한다. 사용자와 상호작용하는 이벤트 발생 시 안드로이드 ..

<함수형 프로그래밍> 백준 9461번

이건 음 재귀함수를 이용해 해결했다. 그런데 메모이제이션 부분은 mutable하게 구현되서 마음에 들지 않는다. 꽤나 찾아봤는데 메모이제이션을 immutable하게 할수 있는 방법을 모르겠다. 이 문제를 통해서 재귀함수를 이용해 immutable하게 구현할수 있다는 것을 한걸음 느끼게 된거같다. 파일에서 자동으로 입력 받는 부분이나, 입력부를 처리하는게 제일 까다로웠다. import Foundation /* let file = "input.txt" var text = "" if let dir = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first{ let fileURL = dir.appendingPathComponent..

<ios개발> 프로비저닝 프로파일

[https://medium.com/@abhimuralidharan/what-is-a-provisioning-profile-in-ios-77987a7c54c2] 한글보다, 여기 설명이 더 자세한거 같다. Why Provisioning Profiles? Unlike Android, you can’t install any app on an iOS device. It has to be signed by Apple first. However, when you’re developing an app, you probably want to test it before sending it to Apple for approval. Provisioning profile act as a link between the devi..

<함수형 프로그래밍> 5편 Functional Reactive Programming Intro by Mike Bopp

[https://www.rapiddg.com/article/functional-reactive-programming-intro] The ReactiveCocoa Project There are many implementations of FRP in most of the popular languages. I believe Java, and .NET were among the first to really get widespread adoption. In the world of Cocoa programming (Swift/Objective-C) the framework I am most familiar with is ReactiveCocoa. A little history on this project. Ver..

<함수형 프로그래밍> 4편 what is functional programming and state!! by mike bopp

[https://www.rapiddg.com/article/what-functional-programming-and-state] 여기 정말 잘나와있다. 이런식으로 검색하자. "what is a state in functional programming" 이게 검색어이다. State State is one of those terms that is thrown around a lot when discussing modern application development. And it may not be something we have traditionally talked much about about, at least not referring to it as "state". Application state is ..

<함수형 프로그래밍> 3.5편 클로저(Closure)

스위프트에서 클로져가 클로저를 감싸는 주변 콘텍스트?(변수,상수)를 캡쳐한다는데 캡쳐한다는게 항상 무슨 의미인지 정확히 이해가 안됬다. 함수가 스택에서 제거되도 지우지 않고 남겨논다는 건가? 원래 제거되면 제거되는거지 도대체 왜 남는거지?? 클로저 표현식 문법(Closure Expression Syntax) 클로저 표현식 문법의 일반 형식은 다음과 같음. { (parameters) -> return type in statements } 클로저의 내용은 in 키워드로 시작하며 이 키워드는 클로저 인자와 반환 타입의 정의가 끝났고 클로저 내용이 시작함을 가르킴. Capturing Values A closure can capture constants and variables from the surroundin..

<함수형 프로그래밍> 3편, 유틉 강의정리, composable,transducer,reducer

[https://www.youtube.com/watch?v=estNbh2TF3E] 이 강의 정리한다. function comporision - swift methods are not composable - we should do everthing to promote composition - curried functions are highly composable 왜 메소드가 not composable인가 말해본다. 음 근데 난 컴포저블이 뭔지 모르겠는데; import Foundation extension Int { func square () -> Int{ return self * self } func incr() -> Int{ return self + 1 } } 3.square().incr() let xs..

<함수형 프로그래밍> 2편, Functional Thinking 함수형 사고지음 : 닐 포드

[https://www.youtube.com/watch?v=estNbh2TF3E&list=PLnVmIi3a0KsNhMHTImsGL75PpGS9sY5xj&index=21&t=0s] 스위프트 함수형 프로그래밍 강의인데 아직 안봄. 음 봤는데, 잘 모르겠음 리듀서 트랜듀서 컴포저블등.. 음 어느 맥락에서 이걸 소개하는지 모르겠다 그래도 일단 이런게 있구나 했음. [http://www.jangun.com/study/FunctionalThinking.html] 함수형 프로그래밍 전체적인 설명 , 글임. Functional Thinking 함수형 사고 지음 : 닐 포드 김재완 옮김 목차 요약 Chapter 1 왜 Chapter 2 전환 Chapter 3 양도하라 Chapter 4 열심히 보다는 현명하게 Chapte..