• 请不要在回答技术问题时复制粘贴 AI 生成的内容
wuyinyin
V2EX  ›  程序员

其实想用 function 表达的是一句诗,但不知道是否规范,求指正,如何才能更美?

  •  
  •   wuyinyin · Oct 14, 2015 · 3115 views
    This topic created in 4047 days ago, the information mentioned may be changed or developed.

    if (TRIP_BEGIN)
    {
    hope();
    }
    function hope()
    {
    道路漫长﹐充满奇迹﹐充满发现
    }

    hahasong
    hahasong
    Oct 14, 2015
    1
    pseudocode
    XianZaiZhuCe
    XianZaiZhuCe
    Oct 14, 2015
    2
    你这代码是给人看的还是给程序看的?
    htfy96
    htfy96
    Oct 14, 2015
    3
    ruby:

    def trip
    yield "道路漫长﹐充满奇迹﹐充满发现"
    end

    begin trip do |hope|
    puts hope
    end
    end
    wuyinyin
    wuyinyin
    OP
    Oct 15, 2015
    4
    @htfy96 多谢少年
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2543 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 11:13 · PVG 19:13 · LAX 03:13 · JFK 06:13
    ♥ Do have faith in what you're doing.