1260 (Elixir 1.11.2-otp-23)
                                            
                                                
                                                
                                                
                                                
                                                
                                                 11406 단어  Elixir
                    
전날은 @ m에 시구치 씨의 「[Elixir] Reference를 만드는 방법」이었습니다.
6일간 감사합니다. 나머지는 맡겨주세요.
소개
Elixir 즐기십니까?
1260 란 무엇입니까 대답
어떻게 세었어?
여기 으로 계산
$\huge{거짓말입니다}$
새빨간 거짓말입니다
@namosuke의 "【빌어 먹을 앱】PHP 함수 이름 교환"을 바라보고 있습니다. 보았습니다
매우 유용한 페이지
Elixir
이런 느낌
:code.all_loaded()
|> Enum.filter(fn {mod, _} -> "#{mod}" =~ ~r{^[A-Z]} end)
|> Enum.map(fn {mod, _} -> mod end)
|> Enum.reduce(%{}, fn mod, acc -> 
  Map.put(acc, mod, mod.__info__(:functions))
end)
 결과
%{
  Supervisor.Default => [init: 1],
  Module => [
    __get_attribute__: 3,
    __put_attribute__: 4,
    add_doc: 5,
    add_doc: 6,
    check_behaviours_and_impls: 4,
    compile_definition_attributes: 6,
    concat: 1,
    concat: 2,
    create: 3,
    defines?: 2,
    defines?: 3,
    defines_type?: 2,
    definitions_in: 1,
    definitions_in: 2,
    delete_attribute: 2,
    eval_quoted: 2,
    eval_quoted: 3,
    eval_quoted: 4,
    get_attribute: 2,
    get_attribute: 3,
    has_attribute?: 2,
    make_overridable: 2,
    open?: 1,
    overridable?: 2,
    put_attribute: 3,
    register_attribute: 3,
    safe_concat: 1,
    safe_concat: 2,
    spec_to_callback: 2,
    split: 1
  ],
  Inspect.Atom => [__impl__: 1, inspect: 2],
  Inspect => [__protocol__: 1, impl_for: 1, impl_for!: 1, inspect: 2],
  Access => [
    all: 0,
    at: 1,
 수를 세자.
:code.all_loaded()
|> Enum.filter(fn {mod, _} -> "#{mod}" =~ ~r{^[A-Z]} end)
|> Enum.map(fn {mod, _} -> mod end)
|> Enum.reduce(%{}, fn mod, acc ->
  Map.put(acc, mod, mod.__info__(:functions))
end)
|> Enum.reduce(0, fn {_, funs}, acc -> acc + Enum.count(funs) end)
:code.all_loaded()
|> Enum.filter(fn {mod, _} -> "#{mod}" =~ ~r{^[A-Z]} end)
|> Enum.map(fn {mod, _} -> mod end)
|> Enum.reduce(%{}, fn mod, acc -> 
  Map.put(acc, mod, mod.__info__(:functions))
end)
%{
  Supervisor.Default => [init: 1],
  Module => [
    __get_attribute__: 3,
    __put_attribute__: 4,
    add_doc: 5,
    add_doc: 6,
    check_behaviours_and_impls: 4,
    compile_definition_attributes: 6,
    concat: 1,
    concat: 2,
    create: 3,
    defines?: 2,
    defines?: 3,
    defines_type?: 2,
    definitions_in: 1,
    definitions_in: 2,
    delete_attribute: 2,
    eval_quoted: 2,
    eval_quoted: 3,
    eval_quoted: 4,
    get_attribute: 2,
    get_attribute: 3,
    has_attribute?: 2,
    make_overridable: 2,
    open?: 1,
    overridable?: 2,
    put_attribute: 3,
    register_attribute: 3,
    safe_concat: 1,
    safe_concat: 2,
    spec_to_callback: 2,
    split: 1
  ],
  Inspect.Atom => [__impl__: 1, inspect: 2],
  Inspect => [__protocol__: 1, impl_for: 1, impl_for!: 1, inspect: 2],
  Access => [
    all: 0,
    at: 1,
:code.all_loaded()
|> Enum.filter(fn {mod, _} -> "#{mod}" =~ ~r{^[A-Z]} end)
|> Enum.map(fn {mod, _} -> mod end)
|> Enum.reduce(%{}, fn mod, acc ->
  Map.put(acc, mod, mod.__info__(:functions))
end)
|> Enum.reduce(0, fn {_, funs}, acc -> acc + Enum.count(funs) end)
Wrapping Up
Elixir 모르는 것이 있다면 영어로 구그하면 대답이 곧 발견됩니다
Get a list of all elixir modules in IEx 그렇다면 다음 기사에서 사용했습니다.
 
  
 
Reference
이 문제에 관하여(1260 (Elixir 1.11.2-otp-23)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/torifukukaiou/items/a8f2eb1cf96e9cf385d8텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)