From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.help Subject: Re: count char in string [The Emacs Challenge Competition - round 2, with fallout] Date: Wed, 28 Oct 2020 13:19:05 -0400 Message-ID: References: <87r1pj41wa.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20161"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs mailing list , Emanuel Berg To: Corwin Brust Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 28 18:20:03 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXp7C-0005A4-Ez for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 28 Oct 2020 18:20:02 +0100 Original-Received: from localhost ([::1]:59376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXp7B-0000gp-El for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 28 Oct 2020 13:20:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXp6a-0000fc-Ed for help-gnu-emacs@gnu.org; Wed, 28 Oct 2020 13:19:24 -0400 Original-Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]:42448) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXp6Y-0006KG-IT for help-gnu-emacs@gnu.org; Wed, 28 Oct 2020 13:19:23 -0400 Original-Received: by mail-ot1-x336.google.com with SMTP id h62so4895021oth.9 for ; Wed, 28 Oct 2020 10:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gMADZw3RzdMQuDhMit3I+1mBkMfELvyt3g/gEy56mWg=; b=uDPom/Dx2qgvnsWr6i+Ozg+ay1AiDbKdj4xI9RdrjFaimU8J9Sfj1MSGYKy8gMkWzT SMvk2DQkOBLBLF9xcr5riyhiovuya+M6PNG+rv17BvqQmAlQdPTT0LgxMvXuW1/hazrU Mq2vhLQN9pKto2503bo8+O6sEBvcJXUMQY6kO1QV9x1neXczyObjcIIoyE2qX0kv9sMt ul5lEvuH00NdGFyQJ0lOAJctgTW60yJuQJ00Cp2kCyeA1jqHQAa/xGEYLgXpK1zBEQAA 1mXxM/gkoshdYqukgC6XMoTTWyXarrMnOFQ/PFjz4W9Xq7PcOipraeEuYe2hF7BVq8vT FO5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gMADZw3RzdMQuDhMit3I+1mBkMfELvyt3g/gEy56mWg=; b=BoL7U7L3rx+62PrTJMRmCEiZPULZdQyyVsSLH38CuKyzWwgxTaKMVHKPmqhwA5jQJa WfAZt6KDtt5KSBHmng4GWm029Kqr4fVFE4leYpGSf4S+0X4+63NU6HhOA21rgx6M4QVS tzgfWQGF6pHicSnJE59eYxS7FlufS1YZjKs1gCt8In/pAGPZIt4M+Jq+RDoivM2+YSsQ bkefH3lGzTot7+lNxYBYP0arawjQZv8whVMkGBs+y35ba8g+pGYvvaoaMAtYrltnYpvc 000qWtim6SZgMspGeq/b9WlBw1YJKfu2RmEKAh8XvMGok+dppnGph9eaRAknIC8XPE4K jP4w== X-Gm-Message-State: AOAM530QLhB5yvI8EWvqteW1JacH83ZBSRgk/bDR3hK94EU8mbgo269d wArGa+9Bors0wQcIj2QO456XLQWs/iMM0txP7GI= X-Google-Smtp-Source: ABdhPJwJFp2FZDWJWdRyAKqSwu344DphDgb3srejPTJjWYd33WcerttGup6qgg5bPAufK2JhP5Fe0ka8bFJ/opJsSmE= X-Received: by 2002:a9d:3d06:: with SMTP id a6mr213978otc.368.1603905560725; Wed, 28 Oct 2020 10:19:20 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::336; envelope-from=npostavs@gmail.com; helo=mail-ot1-x336.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124788 Archived-At: On Wed, 28 Oct 2020 at 04:04, Corwin Brust wrote: > (seq-count (apply-partially 'eq char) > (seq-into string 'list))) You don't need the seq-into, just pass string directly to seq-count.