Code Metaphor

Programming, Writing, Reading, Thoughts…

Phunctional 0.9.1 릴리즈

Phunctional 0.9.1을 릴리즈했다. 거의 두세 달을 미루고 미루다가 결국 몇몇 중요한 티켓을 미뤄버리고 일단 완료된 것들로만 내버렸다. 불안하던 부분이 거의 사라졌고, 반복자 관련 유틸리가 많이 추가되면서 훨씬 편한 PHP 프로그래밍이 가능해졌다.

이번 버전에 추가된 Combination이나 집합 자료형 Set 따위를 이용하면 다음과 같은 코드가 가능해진다.

function chars_tails($str) {
    $chars = new Set($str);
    return combine($chars, map(def(&$char)? strlen($str) - 1 - strrpos($str, $char) :fed(), $chars));
}

문제는 코딩 도장에서 가져왔다. “마지막 출현 이후 남은 갯수 세기” 이 문제를 일반 PHP로는 어떤 식으로 풀 수 있을까?

This entry was posted on July 18, 2008 at 5:08 PM. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

One Response to “Phunctional 0.9.1 릴리즈”

  1. 박영식 Says:

    ㅎㅎ.. Me2php 사용해 보고 있습니다. 잘 쓰겠습니다.

Powered by WordPress. Styled by Hong, MinHee. XML Feed, Comments XML Feed.